CMakeLists.txt: add -rpath to look for libtownengine.so relative to executable

This commit is contained in:
veclav talica 2024-10-07 11:04:05 +03:00
parent 813dc539c8
commit 06b3ad2583

View File

@ -172,12 +172,15 @@ function(give_options_without_warnings target)
target_compile_options(${target} PUBLIC target_compile_options(${target} PUBLIC
${BUILD_FLAGS} ${BUILD_FLAGS}
$<$<CONFIG:Release>:${BUILD_FLAGS_RELEASE}> $<$<CONFIG:Release>:${BUILD_FLAGS_RELEASE}>
$<$<CONFIG:Debug>:${BUILD_FLAGS_DEBUG}>) $<$<CONFIG:Debug>:${BUILD_FLAGS_DEBUG}>
$<$<BOOL:${LINUX}>:-Wl,-rpath,./>)
target_link_options(${target} PUBLIC target_link_options(${target} PUBLIC
${BUILD_FLAGS} ${BUILD_FLAGS}
# -Wl,--no-undefined # TODO: use later for implementing no-libc
$<$<CONFIG:Release>:${BUILD_FLAGS_RELEASE}> $<$<CONFIG:Release>:${BUILD_FLAGS_RELEASE}>
$<$<CONFIG:Debug>:${BUILD_FLAGS_DEBUG}>) $<$<CONFIG:Debug>:${BUILD_FLAGS_DEBUG}>
$<$<BOOL:${LINUX}>:-Wl,-rpath,./>)
target_compile_definitions(${target} PUBLIC target_compile_definitions(${target} PUBLIC
ORGANIZATION_NAME="${ORGANIZATION_NAME}" ORGANIZATION_NAME="${ORGANIZATION_NAME}"