CMakeLists.txt

changeset 1040
3301cf2ea7ff
parent 1037
4a9185e94d78
child 1071
ff4639b672ae
--- a/CMakeLists.txt	Sun Oct 16 17:54:22 2016 +0300
+++ b/CMakeLists.txt	Sun Oct 16 17:54:42 2016 +0300
@@ -9,17 +9,12 @@
 cmake_minimum_required (VERSION 2.6)
 
 option (TRANSPARENT_DIRECT_COLORS "Enables non-standard transparent direct colors" OFF)
-option (USE_QT5 "Use Qt5 instead of Qt4" OFF)
 
-if (USE_QT5)
-	find_package (Qt5Widgets REQUIRED)
-	find_package (Qt5Core REQUIRED)
-	find_package (Qt5OpenGL REQUIRED)
-	find_package (Qt5Network REQUIRED)
-	set (CMAKE_AUTOMOC ON)
-else()
-	find_package (Qt4 REQUIRED)
-endif()
+find_package (Qt5Widgets REQUIRED)
+find_package (Qt5Core REQUIRED)
+find_package (Qt5OpenGL REQUIRED)
+find_package (Qt5Network REQUIRED)
+set (CMAKE_AUTOMOC ON)
 
 find_package (OpenGL REQUIRED)
 
@@ -195,34 +190,15 @@
 	endif()
 endif()
 
-if (USE_QT5)
-	qt5_add_resources (LDFORGE_QRC ${LDFORGE_RESOURCES})
-	qt5_wrap_ui (LDFORGE_FORMS_HEADERS ${LDFORGE_FORMS})
-	add_executable (ldforge WIN32 ${LDFORGE_SOURCES} ${LDFORGE_HEADERS}
-		${LDFORGE_QRC} ${LDFORGE_FORMS_HEADERS}
-		${CMAKE_BINARY_DIR}/configuration.cpp)
-else()
-	qt4_wrap_ui (LDFORGE_FORMS_HEADERS ${LDFORGE_FORMS})
-	qt4_add_resources (LDFORGE_RCC ${LDFORGE_RESOURCES})
-	add_executable (ldforge WIN32 ${LDFORGE_SOURCES} ${LDFORGE_RCC}
-		${LDFORGE_FORMS_HEADERS} ${LDFORGE_HEADERS}
-		${CMAKE_BINARY_DIR}/configuration.cpp)
-endif()
+qt5_add_resources (LDFORGE_QRC ${LDFORGE_RESOURCES})
+qt5_wrap_ui (LDFORGE_FORMS_HEADERS ${LDFORGE_FORMS})
+add_executable (ldforge WIN32 ${LDFORGE_SOURCES} ${LDFORGE_HEADERS}
+	${LDFORGE_QRC} ${LDFORGE_FORMS_HEADERS}
+	${CMAKE_BINARY_DIR}/configuration.cpp)
 
 set_source_files_properties (${LDFORGE_HEADERS} PROPERTIES HEADER_FILE_ONLY TRUE)
 set_target_properties (ldforge PROPERTIES AUTOMOC 1)
-
-if (USE_QT5)
-	target_link_libraries (ldforge Qt5::Widgets Qt5::Network Qt5::OpenGL ${OPENGL_LIBRARIES})
-else()
-	target_link_libraries (ldforge
-		${QT_QTCORE_LIBRARY}
-		${QT_QTGUI_LIBRARY}
-		${QT_QTNETWORK_LIBRARY}
-		${QT_QTOPENGL_LIBRARY}
-		${OPENGL_LIBRARIES}
-	)
-endif()
+target_link_libraries (ldforge Qt5::Widgets Qt5::Network Qt5::OpenGL ${OPENGL_LIBRARIES})
 
 add_custom_target (config_collection ALL
 	COMMAND python

mercurial