Skip to content
Snippets Groups Projects
Commit 7105903c authored by Lars Bilke's avatar Lars Bilke
Browse files

[CMake] Run Qt moc & uic just on Qt-related targets.

parent 9463cd65
No related branches found
No related tags found
No related merge requests found
......@@ -29,6 +29,10 @@ include_directories(
${CMAKE_CURRENT_BINARY_DIR}/NetCdfDialog/NetCdfDialogLib_autogen/include
)
set(CMAKE_AUTOMOC TRUE)
set(CMAKE_AUTOUIC TRUE)
set(CMAKE_AUTORCC TRUE)
# Add subprojects
add_subdirectory(Base)
add_subdirectory(DataView/StratView)
......
......@@ -11,13 +11,9 @@ include_directories(
${CMAKE_CURRENT_BINARY_DIR}/OGSFileConverterLib_autogen/include
)
file(GLOB_RECURSE UIS *.ui)
source_group("UI Files" FILES ${UIS})
add_library(OGSFileConverterLib
${SOURCES}
${HEADERS}
${UIS}
)
target_link_libraries(OGSFileConverterLib
PUBLIC QtBase MathLib
......@@ -31,7 +27,12 @@ target_link_libraries(OGSFileConverter
ApplicationsFileIO
)
set_property(TARGET OGSFileConverter PROPERTY FOLDER "Utilities")
set_target_properties(OGSFileConverter OGSFileConverterLib
PROPERTIES
FOLDER "Utilities"
AUTOMOC ON
AUTOUIC ON
)
if(OGS_USE_PCH)
cotire(OGSFileConverter)
......
......@@ -103,9 +103,6 @@ if(OGS_BUILD_GUI)
endif()
find_package(Qt5 5.2 REQUIRED ${QT_MODULES})
cmake_policy(SET CMP0020 NEW)
set(CMAKE_AUTOMOC TRUE)
set(CMAKE_AUTOUIC TRUE)
set(CMAKE_AUTORCC TRUE)
if(CMAKE_CROSSCOMPILING)
find_package(PkgConfig REQUIRED)
pkg_check_modules(QT_XML_DEPS REQUIRED Xml)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment