mirror of
https://github.com/Sude-/lgogdownloader.git
synced 2024-11-20 11:49:17 +01:00
Merge branch 'qt6' of https://github.com/chewi/lgogdownloader
This commit is contained in:
commit
5cca5da0be
@ -45,8 +45,12 @@ file(GLOB SRC_FILES
|
|||||||
)
|
)
|
||||||
|
|
||||||
if(USE_QT_GUI)
|
if(USE_QT_GUI)
|
||||||
find_package(Qt5Widgets CONFIG REQUIRED)
|
set(QT Qt6)
|
||||||
find_package(Qt5WebEngineWidgets CONFIG REQUIRED)
|
find_package(Qt6 COMPONENTS Widgets WebEngineWidgets CONFIG)
|
||||||
|
if(NOT Qt6_FOUND)
|
||||||
|
set(QT Qt5)
|
||||||
|
find_package(Qt5 REQUIRED COMPONENTS Widgets WebEngineWidgets CONFIG)
|
||||||
|
endif()
|
||||||
|
|
||||||
file(GLOB QT_GUI_SRC_FILES
|
file(GLOB QT_GUI_SRC_FILES
|
||||||
src/gui_login.cpp
|
src/gui_login.cpp
|
||||||
@ -140,11 +144,17 @@ file(REMOVE ${CMAKE_BINARY_DIR}/test_atomic.cpp)
|
|||||||
|
|
||||||
if(USE_QT_GUI)
|
if(USE_QT_GUI)
|
||||||
target_link_libraries(${PROJECT_NAME}
|
target_link_libraries(${PROJECT_NAME}
|
||||||
PRIVATE Qt5::Widgets
|
PRIVATE ${QT}::Widgets
|
||||||
PRIVATE Qt5::WebEngineWidgets
|
PRIVATE ${QT}::WebEngineWidgets
|
||||||
)
|
)
|
||||||
endif(USE_QT_GUI)
|
endif(USE_QT_GUI)
|
||||||
|
|
||||||
|
if(Qt6_FOUND)
|
||||||
|
set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 17)
|
||||||
|
else()
|
||||||
|
set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 11)
|
||||||
|
endif(Qt6_FOUND)
|
||||||
|
|
||||||
if(MSVC)
|
if(MSVC)
|
||||||
# Force to always compile with W4
|
# Force to always compile with W4
|
||||||
if(CMAKE_CXX_FLAGS MATCHES "/W[0-4]")
|
if(CMAKE_CXX_FLAGS MATCHES "/W[0-4]")
|
||||||
@ -154,7 +164,7 @@ if(MSVC)
|
|||||||
endif()
|
endif()
|
||||||
elseif(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
elseif(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||||
# Update if necessary
|
# Update if necessary
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Wextra -Wno-long-long -fexceptions")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wno-long-long -fexceptions")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(INSTALL_BIN_DIR bin CACHE PATH "Installation directory for executables")
|
set(INSTALL_BIN_DIR bin CACHE PATH "Installation directory for executables")
|
||||||
|
Loading…
Reference in New Issue
Block a user