summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Rolf Eike Beer <eike@sf-mail.de>2019-03-03 22:57:10 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-03-05 13:27:54 -0800
commitf555fa787f54ca1fa23162fa0ade9addab387293 (patch)
treed671ca4b385314c587cebdeb78f0e1a42c15348e
parentb702e8e2257c259d5d4ab2ec1547057d525e03af (diff)
downloadsubsurface-f555fa787f54ca1fa23162fa0ade9addab387293.tar.gz
CMake: simplify writing qt.conf on Windows
Signed-off-by: Rolf Eike Beer <eike@sf-mail.de>
-rw-r--r--CMakeLists.txt12
-rw-r--r--smtk-import/CMakeLists.txt12
2 files changed, 6 insertions, 18 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 54ce2f11d..1bf03a09c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -364,15 +364,9 @@ add_dependencies(subsurface_corelib version)
# add platform specific actions
if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
- add_custom_command(
- OUTPUT ${CMAKE_BINARY_DIR}/qt.conf
- COMMAND echo \"[Paths]\" > ${CMAKE_BINARY_DIR}/qt.conf \; echo \"Prefix=.\" >> ${CMAKE_BINARY_DIR}/qt.conf
- )
- add_custom_target(
- generate_qtconf
- DEPENDS ${CMAKE_BINARY_DIR}/qt.conf
- )
- add_dependencies(${SUBSURFACE_TARGET} generate_qtconf)
+ file(WRITE ${CMAKE_BINARY_DIR}/qt.conf "[Paths]
+Prefix=.
+")
endif()
# build an automated html exporter
diff --git a/smtk-import/CMakeLists.txt b/smtk-import/CMakeLists.txt
index 2c43076c1..dbbb90d7b 100644
--- a/smtk-import/CMakeLists.txt
+++ b/smtk-import/CMakeLists.txt
@@ -114,15 +114,9 @@ if (COMMANDLINE AND CMAKE_SYSTEM_NAME STREQUAL "Linux")
endif()
if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
- add_custom_command(
- OUTPUT ${CMAKE_BINARY_DIR}/qt.conf
- COMMAND echo \"[Paths]\" > ${CMAKE_BINARY_DIR}/qt.conf \; echo \"Prefix=.\" >> ${CMAKE_BINARY_DIR}/qt.conf
- )
- add_custom_target(
- generate_qtconf
- DEPENDS ${CMAKE_BINARY_DIR}/qt.conf
- )
- add_dependencies(${SMTK_IMPORT_TARGET} generate_qtconf)
+ file(WRITE ${CMAKE_BINARY_DIR}/qt.conf "[Paths]
+Prefix=.
+")
endif()
target_link_libraries(${SMTK_IMPORT_TARGET} smtk_import ${SMTK_LINK_LIBRARIES})