diff options
author | Mattes D <github@xoft.cz> | 2024-03-14 15:23:24 +0100 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2024-03-15 00:24:05 +0100 |
commit | bc4975a86418949a7cdc48c0d7afa34624ef710c (patch) | |
tree | e312507b3fc7978893a4521bc0b4de86e75b38e5 /src/CMakeLists.txt | |
parent | Reverted moving Lua to C++. (diff) | |
download | cuberite-bc4975a86418949a7cdc48c0d7afa34624ef710c.tar cuberite-bc4975a86418949a7cdc48c0d7afa34624ef710c.tar.gz cuberite-bc4975a86418949a7cdc48c0d7afa34624ef710c.tar.bz2 cuberite-bc4975a86418949a7cdc48c0d7afa34624ef710c.tar.lz cuberite-bc4975a86418949a7cdc48c0d7afa34624ef710c.tar.xz cuberite-bc4975a86418949a7cdc48c0d7afa34624ef710c.tar.zst cuberite-bc4975a86418949a7cdc48c0d7afa34624ef710c.zip |
Diffstat (limited to '')
-rw-r--r-- | src/CMakeLists.txt | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 131e26e33..873e0ccba 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -193,6 +193,13 @@ SET_TARGET_PROPERTIES(${CMAKE_PROJECT_NAME} PROPERTIES +# Enable "-rdynamic" on Linux, so that external Lua modules can import Lua API symbols from the main executable: +# ( https://stackoverflow.com/questions/24015025/resolving-symbols-in-shared-object-to-executable ) +if (NOT WIN32) + target_link_options(${CMAKE_PROJECT_NAME} PRIVATE "-rdynamic") +endif() + + MACRO(TO_NATIVE_PATH PATH OUT) FILE(TO_NATIVE_PATH "${PATH}" "${OUT}") IF(MINGW) |