mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-24 22:14:36 +02:00
improve RPATH handling, apply RPATH when installing dylibs
This commit is contained in:
parent
d0f1275e61
commit
9dc5f3ed8b
@ -137,4 +137,4 @@ target_link_libraries(Nullkiller PRIVATE TBB::tbb)
|
||||
vcmi_set_output_dir(Nullkiller "AI")
|
||||
enable_pch(Nullkiller)
|
||||
|
||||
install(TARGETS Nullkiller RUNTIME DESTINATION ${AI_LIB_DIR} LIBRARY DESTINATION ${AI_LIB_DIR})
|
||||
install(TARGETS Nullkiller RUNTIME DESTINATION ${AI_LIB_DIR} LIBRARY DESTINATION ${AI_LIB_DIR} OPTIONAL)
|
||||
|
@ -195,7 +195,7 @@ elseif(APPLE_IOS)
|
||||
|
||||
set_target_properties(vcmiclient PROPERTIES
|
||||
MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_LIST_DIR}/ios/Info.plist"
|
||||
SKIP_BUILD_RPATH 1
|
||||
XCODE_ATTRIBUTE_LD_RUNPATH_SEARCH_PATHS "@executable_path/Frameworks"
|
||||
XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED YES
|
||||
XCODE_ATTRIBUTE_ASSETCATALOG_COMPILER_APPICON_NAME AppIcon
|
||||
XCODE_ATTRIBUTE_CODE_SIGN_ENTITLEMENTS ${ENTITLEMENTS_OUT_PATH}
|
||||
@ -229,7 +229,6 @@ enable_pch(vcmiclient)
|
||||
if(APPLE_IOS)
|
||||
add_custom_command(TARGET vcmiclient POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} --install "${CMAKE_BINARY_DIR}" --config "$<CONFIG>" --prefix "$<TARGET_BUNDLE_CONTENT_DIR:vcmiclient>"
|
||||
COMMAND ${CMAKE_INSTALL_NAME_TOOL} -add_rpath @executable_path/Frameworks $<TARGET_FILE:vcmiclient> || true
|
||||
COMMAND ${CMAKE_SOURCE_DIR}/apple_codesign.sh
|
||||
)
|
||||
else()
|
||||
|
@ -21,9 +21,12 @@ prefixPath="$boostPrefix;$ffmpegDir;$sdlLibsDir;$qtDir;$tbbDir;$luajitDir"
|
||||
# fi
|
||||
|
||||
srcDir="../vcmi"
|
||||
cmake "$srcDir" -G Xcode -T buildsystem=1 \
|
||||
# cmake "$srcDir" -G Xcode -T buildsystem=1 \
|
||||
cmake "$srcDir" -G Xcode \
|
||||
-DBUNDLE_IDENTIFIER_PREFIX=com.kambala \
|
||||
-DENABLE_PCH=OFF \
|
||||
-Wno-dev \
|
||||
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
|
||||
-DCMAKE_TOOLCHAIN_FILE="$srcDir/ios.toolchain.cmake" \
|
||||
-DPLATFORM=${1:-OS64} \
|
||||
-DDEPLOYMENT_TARGET=11.0 \
|
||||
|
@ -110,7 +110,7 @@ if(APPLE_IOS)
|
||||
|
||||
set_target_properties(vcmilauncher PROPERTIES
|
||||
MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_LIST_DIR}/ios/Info.plist"
|
||||
SKIP_BUILD_RPATH 1
|
||||
XCODE_ATTRIBUTE_LD_RUNPATH_SEARCH_PATHS "@executable_path/Frameworks"
|
||||
XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED YES
|
||||
XCODE_ATTRIBUTE_ASSETCATALOG_COMPILER_APPICON_NAME AppIcon
|
||||
XCODE_ATTRIBUTE_CODE_SIGN_ENTITLEMENTS ${ENTITLEMENTS_OUT_PATH}
|
||||
@ -134,7 +134,6 @@ if(APPLE_IOS)
|
||||
install(DIRECTORY icons DESTINATION ${DATA_DIR})
|
||||
add_custom_command(TARGET vcmilauncher POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} --install "${CMAKE_BINARY_DIR}" --config "$<CONFIG>" --prefix "$<TARGET_BUNDLE_CONTENT_DIR:vcmilauncher>"
|
||||
COMMAND ${CMAKE_INSTALL_NAME_TOOL} -add_rpath @executable_path/Frameworks $<TARGET_FILE:vcmilauncher> || true
|
||||
COMMAND ${CMAKE_SOURCE_DIR}/apple_codesign.sh
|
||||
)
|
||||
else()
|
||||
|
@ -20,4 +20,4 @@ target_link_libraries(vcmiERM Boost::boost vcmi)
|
||||
vcmi_set_output_dir(vcmiERM "scripting")
|
||||
enable_pch(vcmiERM)
|
||||
|
||||
install(TARGETS vcmiERM DESTINATION ${SCRIPTING_LIB_DIR})
|
||||
install(TARGETS vcmiERM LIBRARY DESTINATION ${SCRIPTING_LIB_DIR} OPTIONAL)
|
||||
|
@ -45,7 +45,7 @@ target_link_libraries(vcmiLua Boost::boost luajit::luajit vcmi)
|
||||
vcmi_set_output_dir(vcmiLua "scripting")
|
||||
enable_pch(vcmiLua)
|
||||
|
||||
install(TARGETS vcmiLua DESTINATION ${SCRIPTING_LIB_DIR})
|
||||
install(TARGETS vcmiLua LIBRARY DESTINATION ${SCRIPTING_LIB_DIR} OPTIONAL)
|
||||
|
||||
#manually copy lua dll from vcpkg folder to build directory on windows since vcpkg deps copy feature has flaws, using hardcoded paths based on vcmi windows deps package 1.1 from github
|
||||
if(MSVC)
|
||||
|
@ -53,7 +53,7 @@ elseif(APPLE_IOS)
|
||||
|
||||
set_target_properties(vcmiserver PROPERTIES
|
||||
MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_LIST_DIR}/ios/Info.plist"
|
||||
SKIP_BUILD_RPATH 1
|
||||
XCODE_ATTRIBUTE_LD_RUNPATH_SEARCH_PATHS "@executable_path/Frameworks"
|
||||
XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED YES
|
||||
XCODE_ATTRIBUTE_ASSETCATALOG_COMPILER_APPICON_NAME AppIcon
|
||||
XCODE_ATTRIBUTE_CODE_SIGN_ENTITLEMENTS ${ENTITLEMENTS_OUT_PATH}
|
||||
@ -73,7 +73,6 @@ if(APPLE_IOS)
|
||||
# TODO: move to a common dir / add macro?
|
||||
add_custom_command(TARGET vcmiserver POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} --install "${CMAKE_BINARY_DIR}" --config "$<CONFIG>" --prefix "$<TARGET_BUNDLE_CONTENT_DIR:vcmiserver>"
|
||||
COMMAND ${CMAKE_INSTALL_NAME_TOOL} -add_rpath @executable_path/Frameworks $<TARGET_FILE:vcmiserver> || true
|
||||
COMMAND ${CMAKE_SOURCE_DIR}/apple_codesign.sh
|
||||
)
|
||||
else()
|
||||
|
Loading…
Reference in New Issue
Block a user