@@ -532,7 +532,7 @@ set(EXECUTABLE_OUTPUT_PATH "${CMAKE_SOURCE_DIR}/bin")
532
532
if (BUILD_CLIENT)
533
533
add_executable (${PROJECT_NAME} ${client_SRCS} ${extra_windows_SRCS} )
534
534
add_dependencies (${PROJECT_NAME} GenerateVersion)
535
- set (client_LIBS
535
+ target_link_libraries (
536
536
${PROJECT_NAME}
537
537
${ZLIB_LIBRARIES}
538
538
${IRRLICHT_LIBRARY}
@@ -548,9 +548,14 @@ if(BUILD_CLIENT)
548
548
${PLATFORM_LIBS}
549
549
${CLIENT_PLATFORM_LIBS}
550
550
)
551
- target_link_libraries (
552
- ${client_LIBS}
553
- )
551
+ if (NOT USE_LUAJIT)
552
+ set_target_properties (${PROJECT_NAME} PROPERTIES
553
+ # This is necessary for dynamic Lua modules
554
+ # to work when Lua is statically linked (issue #10806)
555
+ ENABLE_EXPORTS 1
556
+ )
557
+ endif ()
558
+
554
559
if (ENABLE_GLES)
555
560
target_link_libraries (
556
561
${PROJECT_NAME}
@@ -621,7 +626,15 @@ if(BUILD_SERVER)
621
626
${PLATFORM_LIBS}
622
627
)
623
628
set_target_properties (${PROJECT_NAME} server PROPERTIES
624
- COMPILE_DEFINITIONS "SERVER" )
629
+ COMPILE_DEFINITIONS "SERVER" )
630
+ if (NOT USE_LUAJIT)
631
+ set_target_properties (${PROJECT_NAME} server PROPERTIES
632
+ # This is necessary for dynamic Lua modules
633
+ # to work when Lua is statically linked (issue #10806)
634
+ ENABLE_EXPORTS 1
635
+ )
636
+ endif ()
637
+
625
638
if (USE_GETTEXT)
626
639
target_link_libraries (${PROJECT_NAME} server ${GETTEXT_LIBRARY} )
627
640
endif ()
@@ -666,7 +679,7 @@ option(APPLY_LOCALE_BLACKLIST "Use a blacklist to avoid broken locales" TRUE)
666
679
if (GETTEXTLIB_FOUND AND APPLY_LOCALE_BLACKLIST)
667
680
set (GETTEXT_USED_LOCALES "" )
668
681
foreach (LOCALE ${GETTEXT_AVAILABLE_LOCALES} )
669
- if (NOT "; ${GETTEXT_BLACKLISTED_LOCALES} ;" MATCHES "; ${LOCALE} ;" )
682
+ if (NOT "${LOCALE} " IN_LIST GETTEXT_BLACKLISTED_LOCALES )
670
683
list (APPEND GETTEXT_USED_LOCALES ${LOCALE} )
671
684
endif ()
672
685
endforeach ()
0 commit comments