Cleanup the cmakelists

This commit is contained in:
2023-10-29 21:41:49 +01:00
parent 3cbe30c80b
commit 890c0b04c0
3 changed files with 84 additions and 97 deletions

View File

@@ -9,21 +9,18 @@ set(CMAKE_AUTORCC ON)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
find_package(QT NAMES Qt6 REQUIRED COMPONENTS Widgets LinguistTools)
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Widgets LinguistTools)
#set(TS_FILES languages/Blackjack_en_GB.ts)
find_package(QT NAMES Qt6 REQUIRED COMPONENTS Widgets)
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Widgets)
set(PROJECT_SOURCES
main.cpp
mainwindow.cpp
mainwindow.hpp
mainwindow.ui
playwindow.cpp
playwindow.hpp
playwindow.ui
images.qrc
${TS_FILES}
main.cpp
mainwindow.cpp
mainwindow.hpp
mainwindow.ui
playwindow.cpp
playwindow.hpp
playwindow.ui
images.qrc
)
add_subdirectory(blackjack)
@@ -37,8 +34,6 @@ if(${QT_VERSION_MAJOR} GREATER_EQUAL 6)
# set_property(TARGET Blackjack APPEND PROPERTY QT_ANDROID_PACKAGE_SOURCE_DIR
# ${CMAKE_CURRENT_SOURCE_DIR}/android)
# For more information, see https://doc.qt.io/qt-6/qt-add-executable.html#target-creation
qt_create_translation(QM_FILES ${CMAKE_SOURCE_DIR} ${TS_FILES})
else()
if(ANDROID)
add_library(Blackjack SHARED
@@ -51,8 +46,6 @@ else()
${PROJECT_SOURCES}
)
endif()
qt5_create_translation(QM_FILES ${CMAKE_SOURCE_DIR} ${TS_FILES})
endif()
target_compile_options(Blackjack PRIVATE $<$<CONFIG:Debug>: