Do not set BUNDLE DESTINATION unless platform is MacOS X

Because that seems to prevent executables from being installed
when using install-binary target
This commit is contained in:
Martchus 2017-08-31 02:12:56 +02:00
parent 032111eef0
commit f8c7a0a0a8
1 changed files with 14 additions and 7 deletions

View File

@ -66,14 +66,21 @@ set_target_properties(${TARGET_PREFIX}${META_PROJECT_NAME}${TARGET_SUFFIX} PROPE
) )
if(NOT META_NO_INSTALL_TARGETS AND ENABLE_INSTALL_TARGETS) if(NOT META_NO_INSTALL_TARGETS AND ENABLE_INSTALL_TARGETS)
set(BUNDLE_INSTALL_DESTINATION bin CACHE STRING "specifies the install destination for bundles")
# add install target for binary # add install target for binary
install(TARGETS ${TARGET_PREFIX}${META_PROJECT_NAME}${TARGET_SUFFIX} if(APPLE)
RUNTIME DESTINATION bin set(BUNDLE_INSTALL_DESTINATION bin CACHE STRING "specifies the install destination for bundles")
BUNDLE DESTINATION "${BUNDLE_INSTALL_DESTINATION}" install(TARGETS ${TARGET_PREFIX}${META_PROJECT_NAME}${TARGET_SUFFIX}
COMPONENT binary RUNTIME DESTINATION bin
) BUNDLE DESTINATION "${BUNDLE_INSTALL_DESTINATION}"
COMPONENT binary
)
else()
install(TARGETS ${TARGET_PREFIX}${META_PROJECT_NAME}${TARGET_SUFFIX}
RUNTIME DESTINATION bin
COMPONENT binary
)
endif()
if(NOT TARGET install-binary) if(NOT TARGET install-binary)
add_custom_target(install-binary add_custom_target(install-binary
COMMAND "${CMAKE_COMMAND}" -DCMAKE_INSTALL_COMPONENT=binary -P "${CMAKE_BINARY_DIR}/cmake_install.cmake" COMMAND "${CMAKE_COMMAND}" -DCMAKE_INSTALL_COMPONENT=binary -P "${CMAKE_BINARY_DIR}/cmake_install.cmake"