diff options
-rw-r--r-- | share/qtcreator/CMakeLists.txt | 21 | ||||
-rw-r--r-- | src/app/CMakeLists.txt | 5 |
2 files changed, 17 insertions, 9 deletions
diff --git a/share/qtcreator/CMakeLists.txt b/share/qtcreator/CMakeLists.txt index 6b432ef96c..3fe6c60b4b 100644 --- a/share/qtcreator/CMakeLists.txt +++ b/share/qtcreator/CMakeLists.txt @@ -1,9 +1,22 @@ -install( - DIRECTORY cplusplus debugger glsl modeleditor qml qmldesigner - qmlicons qml-type-descriptions schemes snippets styles templates themes welcomescreen - DESTINATION "${IDE_DATA_PATH}" +set(template_directories cplusplus debugger glsl modeleditor qml qmldesigner + qmlicons qml-type-descriptions schemes snippets styles templates themes welcomescreen) + +add_custom_target(copy_share_to_builddir ALL + COMMENT Copy files into build directory + VERBATIM ) +foreach(dir IN ITEMS ${template_directories}) + add_custom_command(TARGET copy_share_to_builddir POST_BUILD + COMMAND "${CMAKE_COMMAND}" -E copy_directory "${dir}" + "${PROJECT_BINARY_DIR}/${IDE_DATA_PATH}/${dir}" + WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" + COMMENT Copy files into build directory + VERBATIM + ) +endforeach() + +install(DIRECTORY ${template_directories} DESTINATION "${IDE_DATA_PATH}") install( FILES indexer_preincludes/qglobal.h indexer_preincludes/windows.h DESTINATION "${IDE_DATA_PATH}/indexer_preincludes" diff --git a/src/app/CMakeLists.txt b/src/app/CMakeLists.txt index e44e544784..0ef67b2943 100644 --- a/src/app/CMakeLists.txt +++ b/src/app/CMakeLists.txt @@ -33,11 +33,6 @@ if (WIN32) target_sources(qtcreator PRIVATE qtcreator.rc) endif() -add_custom_command(TARGET qtcreator POST_BUILD - COMMAND "${CMAKE_COMMAND}" -E copy_directory - "${PROJECT_SOURCE_DIR}/share/qtcreator" - "${PROJECT_BINARY_DIR}/${IDE_DATA_PATH}") - if (APPLE) set_target_properties(qtcreator PROPERTIES MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/app-Info.plist" |