aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2020-04-04 23:57:16 -0700
committerChris Robinson <[email protected]>2020-04-05 01:41:36 -0700
commit192b1a1f650157621bf889f246c9b7aa88afd99e (patch)
tree5bcd4f7a507a5c40a7f84b0d0306cf8831960c97
parentde2599b70b8811233c3bceff6076156c739e02a5 (diff)
Require Qt5 for alsoft-config
-rw-r--r--utils/alsoft-config/CMakeLists.txt66
1 files changed, 17 insertions, 49 deletions
diff --git a/utils/alsoft-config/CMakeLists.txt b/utils/alsoft-config/CMakeLists.txt
index 68b9e9de..acc6038e 100644
--- a/utils/alsoft-config/CMakeLists.txt
+++ b/utils/alsoft-config/CMakeLists.txt
@@ -1,28 +1,21 @@
project(alsoft-config)
-option(ALSOFT_NO_QT5 "Use Qt4 instead of Qt5 for alsoft-config" FALSE)
-
-include_directories("${alsoft-config_BINARY_DIR}")
-
-set(alsoft-config_SRCS
- main.cpp
- mainwindow.cpp
- mainwindow.h
- verstr.cpp
- verstr.h
-)
-set(alsoft-config_UIS mainwindow.ui)
-set(alsoft-config_MOCS mainwindow.h)
-
find_package(Qt5Widgets)
-if(Qt5Widgets_FOUND AND NOT ALSOFT_NO_QT5)
- qt5_wrap_ui(UIS ${alsoft-config_UIS})
-
- qt5_wrap_cpp(MOCS ${alsoft-config_MOCS})
-
- add_executable(alsoft-config ${alsoft-config_SRCS} ${UIS} ${RSCS} ${TRS} ${MOCS})
+if(Qt5Widgets_FOUND)
+ qt5_wrap_ui(UIS mainwindow.ui)
+
+ qt5_wrap_cpp(MOCS mainwindow.h)
+
+ add_executable(alsoft-config
+ main.cpp
+ mainwindow.cpp
+ mainwindow.h
+ verstr.cpp
+ verstr.h
+ ${UIS} ${RSCS} ${TRS} ${MOCS})
target_link_libraries(alsoft-config Qt5::Widgets)
- target_include_directories(alsoft-config PRIVATE "${OpenAL_BINARY_DIR}")
+ target_include_directories(alsoft-config PRIVATE "${alsoft-config_BINARY_DIR}"
+ "${OpenAL_BINARY_DIR}")
set_property(TARGET alsoft-config APPEND PROPERTY COMPILE_FLAGS ${EXTRA_CFLAGS})
set_target_properties(alsoft-config PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${OpenAL_BINARY_DIR})
if(TARGET build_version)
@@ -30,33 +23,8 @@ if(Qt5Widgets_FOUND AND NOT ALSOFT_NO_QT5)
endif()
install(TARGETS alsoft-config
- RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
- LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
-else()
- # Need Qt 4.8.0 or newer for the iconset theme attribute to work
- find_package(Qt4 4.8.0 COMPONENTS QtCore QtGui)
- if(QT4_FOUND)
- include(${QT_USE_FILE})
-
- qt4_wrap_ui(UIS ${alsoft-config_UIS})
-
- qt4_wrap_cpp(MOCS ${alsoft-config_MOCS})
-
- add_executable(alsoft-config ${alsoft-config_SRCS} ${UIS} ${RSCS} ${TRS} ${MOCS})
- target_link_libraries(alsoft-config ${QT_LIBRARIES})
- target_include_directories(alsoft-config PRIVATE "${OpenAL_BINARY_DIR}")
- set_property(TARGET alsoft-config APPEND PROPERTY COMPILE_FLAGS ${EXTRA_CFLAGS})
- set_target_properties(alsoft-config PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${OpenAL_BINARY_DIR})
- if(TARGET build_version)
- add_dependencies(alsoft-config build_version)
- endif()
-
- install(TARGETS alsoft-config
- RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
- LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
- )
- endif()
endif()