Install gui-builder to '${TGUI_MISC_INSTALL_PREFIX}/gui-builder' folder (closes #93)

0.8
Bruno Van de Velde 2019-01-21 19:11:02 +01:00
parent 8e4a81e55b
commit ebdb38c4fe
2 changed files with 29 additions and 4 deletions

View File

@ -38,3 +38,28 @@ tgui_set_stdlib(gui-builder)
add_custom_command(TARGET gui-builder POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:gui-builder> ${PROJECT_SOURCE_DIR}/gui-builder/
COMMAND ${CMAKE_COMMAND} -E copy_directory ${PROJECT_SOURCE_DIR}/themes ${PROJECT_SOURCE_DIR}/gui-builder/themes)
set(target_install_dir "${TGUI_MISC_INSTALL_PREFIX}/gui-builder")
# Set the RPATH of the executable on Linux and BSD
if (TGUI_SHARED_LIBS AND (TGUI_OS_LINUX OR TGUI_OS_BSD))
file(RELATIVE_PATH rel_lib_dir
${CMAKE_INSTALL_PREFIX}/${target_install_dir}
${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX})
set_target_properties(gui-builder PROPERTIES
INSTALL_RPATH "$ORIGIN/${rel_lib_dir}")
endif()
# Add the install rule for the executable
install(TARGETS gui-builder
RUNTIME DESTINATION ${target_install_dir} COMPONENT gui-builder
BUNDLE DESTINATION ${target_install_dir} COMPONENT gui-builder)
# Install the resources next to the test executable
install(DIRECTORY "${PROJECT_SOURCE_DIR}/gui-builder/resources"
DESTINATION "${target_install_dir}"
COMPONENT gui-builder)
install(DIRECTORY "${PROJECT_SOURCE_DIR}/themes"
DESTINATION "${target_install_dir}"
COMPONENT gui-builder)

View File

@ -114,7 +114,7 @@ add_custom_command(TARGET tests
COMMAND ${CMAKE_COMMAND} -E copy_directory ${PROJECT_SOURCE_DIR}/tests/resources $<TARGET_FILE_DIR:tests>/resources
COMMAND ${CMAKE_COMMAND} -E copy_directory ${PROJECT_SOURCE_DIR}/themes $<TARGET_FILE_DIR:tests>/resources)
set(target_install_dir ${TGUI_MISC_INSTALL_PREFIX}/tests/)
set(target_install_dir "${TGUI_MISC_INSTALL_PREFIX}/tests")
# Set the RPATH of the executable on Linux and BSD
if (TGUI_SHARED_LIBS AND (TGUI_OS_LINUX OR TGUI_OS_BSD))
@ -133,11 +133,11 @@ install(TARGETS tests
# Install the resources next to the test executable
install(DIRECTORY "${PROJECT_SOURCE_DIR}/tests/resources"
DESTINATION "${TGUI_MISC_INSTALL_PREFIX}/tests"
DESTINATION "${target_install_dir}"
COMPONENT tests)
install(DIRECTORY "${PROJECT_SOURCE_DIR}/tests/expected"
DESTINATION "${TGUI_MISC_INSTALL_PREFIX}/tests"
DESTINATION "${target_install_dir}"
COMPONENT tests)
install(DIRECTORY "${PROJECT_SOURCE_DIR}/themes/"
DESTINATION "${TGUI_MISC_INSTALL_PREFIX}/tests/resources"
DESTINATION "${target_install_dir}/resources"
COMPONENT tests)