diff -r 56c52c10e444 -r d4857a7aa5a1 CMakeLists.txt --- a/CMakeLists.txt Sun Nov 14 21:42:23 2021 +0200 +++ b/CMakeLists.txt Sun Nov 14 21:45:34 2021 +0200 @@ -1,13 +1,8 @@ project (zcinema) cmake_minimum_required (VERSION 2.6) cmake_policy (SET CMP0020 NEW) - -if (USE_QT5) - find_package (Qt5Widgets REQUIRED) - find_package (Qt5Core REQUIRED) -else() - find_package (Qt4 REQUIRED) -endif() +find_package (Qt5Widgets REQUIRED) +find_package (Qt5Core REQUIRED) include_directories (${QT_INCLUDES} ${CMAKE_CURRENT_BINARY_DIR}) @@ -67,35 +62,17 @@ include_directories ("${PROJECT_BINARY_DIR}") include_directories ("${PROJECT_SOURCE_DIR}") -if (USE_QT5) - qt5_generate_moc (ZCINEMA_MOC ${ZCINEMA_HEADERS}) - qt5_add_resources (ZCINEMA_QRC ${ZCINEMA_RESOURCES}) - qt5_wrap_ui (ZCINEMA_FORMS_HEADERS ${ZCINEMA_FORMS}) +qt5_generate_moc (ZCINEMA_MOC ${ZCINEMA_HEADERS}) +qt5_add_resources (ZCINEMA_QRC ${ZCINEMA_RESOURCES}) +qt5_wrap_ui (ZCINEMA_FORMS_HEADERS ${ZCINEMA_FORMS}) - add_library (${PROJECT_NAME}-common STATIC - ${ZCINEMA_COMMON_SOURCES} - ${ZCINEMA_QRC} - ${ZCINEMA_FORMS_HEADERS}) -else() - qt4_wrap_cpp (ZCINEMA_MOC ${ZCINEMA_HEADERS}) - qt4_wrap_ui (ZCINEMA_FORMS_HEADERS ${ZCINEMA_FORMS}) - qt4_add_resources (ZCINEMA_RCC ${ZCINEMA_RESOURCES}) - - add_library (${PROJECT_NAME}-common STATIC - ${ZCINEMA_COMMON_SOURCES} - ${ZCINEMA_RCC} - ${ZCINEMA_FORMS_HEADERS}) -endif() - +add_library (${PROJECT_NAME}-common STATIC + ${ZCINEMA_COMMON_SOURCES} + ${ZCINEMA_QRC} + ${ZCINEMA_FORMS_HEADERS}) add_executable (${PROJECT_NAME} WIN32 ${ZCINEMA_LAUNCHER_SOURCES} zcinema.rc) add_executable (${PROJECT_NAME}-config WIN32 ${ZCINEMA_CONFIG_SOURCES} zcinema.rc) - -if (USE_QT5) - target_link_libraries (${PROJECT_NAME}-common Qt5::Widgets) -else() - target_link_libraries (${PROJECT_NAME}-common ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY}) -endif() - +target_link_libraries (${PROJECT_NAME}-common Qt5::Widgets) target_link_libraries (${PROJECT_NAME} ${PROJECT_NAME}-common) target_link_libraries (${PROJECT_NAME}-config ${PROJECT_NAME}-common)