diff options
author | sfan5 <sfan5@live.de> | 2021-01-29 17:35:29 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-29 17:35:29 +0100 |
commit | 9c91cbf50c06f615449cb9ec1a5d0fbe9bc0bfa5 (patch) | |
tree | 1522e9fabfd291e925c073bc9f16b3c358ee3f41 /src/CMakeLists.txt | |
parent | 5c005ad081a23a1c048ef2c1066f60e0e041c956 (diff) | |
download | minetest-9c91cbf50c06f615449cb9ec1a5d0fbe9bc0bfa5.tar.gz minetest-9c91cbf50c06f615449cb9ec1a5d0fbe9bc0bfa5.tar.bz2 minetest-9c91cbf50c06f615449cb9ec1a5d0fbe9bc0bfa5.zip |
Handle changes caused by CMake minimum version bump (#10859)
fixes #10806
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r-- | src/CMakeLists.txt | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index b6bba6e8d..7bcf8d6c7 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -532,7 +532,7 @@ set(EXECUTABLE_OUTPUT_PATH "${CMAKE_SOURCE_DIR}/bin") if(BUILD_CLIENT) add_executable(${PROJECT_NAME} ${client_SRCS} ${extra_windows_SRCS}) add_dependencies(${PROJECT_NAME} GenerateVersion) - set(client_LIBS + target_link_libraries( ${PROJECT_NAME} ${ZLIB_LIBRARIES} ${IRRLICHT_LIBRARY} @@ -548,9 +548,14 @@ if(BUILD_CLIENT) ${PLATFORM_LIBS} ${CLIENT_PLATFORM_LIBS} ) - target_link_libraries( - ${client_LIBS} - ) + if(NOT USE_LUAJIT) + set_target_properties(${PROJECT_NAME} PROPERTIES + # This is necessary for dynamic Lua modules + # to work when Lua is statically linked (issue #10806) + ENABLE_EXPORTS 1 + ) + endif() + if(ENABLE_GLES) target_link_libraries( ${PROJECT_NAME} @@ -621,7 +626,15 @@ if(BUILD_SERVER) ${PLATFORM_LIBS} ) set_target_properties(${PROJECT_NAME}server PROPERTIES - COMPILE_DEFINITIONS "SERVER") + COMPILE_DEFINITIONS "SERVER") + if(NOT USE_LUAJIT) + set_target_properties(${PROJECT_NAME}server PROPERTIES + # This is necessary for dynamic Lua modules + # to work when Lua is statically linked (issue #10806) + ENABLE_EXPORTS 1 + ) + endif() + if (USE_GETTEXT) target_link_libraries(${PROJECT_NAME}server ${GETTEXT_LIBRARY}) endif() @@ -666,7 +679,7 @@ option(APPLY_LOCALE_BLACKLIST "Use a blacklist to avoid broken locales" TRUE) if (GETTEXTLIB_FOUND AND APPLY_LOCALE_BLACKLIST) set(GETTEXT_USED_LOCALES "") foreach(LOCALE ${GETTEXT_AVAILABLE_LOCALES}) - if (NOT ";${GETTEXT_BLACKLISTED_LOCALES};" MATCHES ";${LOCALE};") + if (NOT "${LOCALE}" IN_LIST GETTEXT_BLACKLISTED_LOCALES) list(APPEND GETTEXT_USED_LOCALES ${LOCALE}) endif() endforeach() |