From beb04f76a81f7529a3cf3124f43879307c0f0a00 Mon Sep 17 00:00:00 2001 From: Myk Taylor Date: Wed, 4 Sep 2024 08:34:41 -0700 Subject: [PATCH 1/2] rename lua lib from lua to lua53 so we don't conflict with other similarly named lua libs --- depends/CMakeLists.txt | 2 +- depends/lua/CMakeLists.txt | 13 +++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/depends/CMakeLists.txt b/depends/CMakeLists.txt index 9dd3ac7e10..1bb46bc881 100644 --- a/depends/CMakeLists.txt +++ b/depends/CMakeLists.txt @@ -8,7 +8,7 @@ add_subdirectory(md5) add_subdirectory(protobuf) if(UNIX) - set_target_properties(lua PROPERTIES COMPILE_FLAGS "-Wno-deprecated-declarations -Wno-deprecated-enum-enum-conversion") + set_target_properties(lua53 PROPERTIES COMPILE_FLAGS "-Wno-deprecated-declarations -Wno-deprecated-enum-enum-conversion") set_target_properties(protoc PROPERTIES COMPILE_FLAGS "-Wno-deprecated-declarations -Wno-restrict") set_target_properties(protoc-bin PROPERTIES COMPILE_FLAGS "-Wno-deprecated-declarations -Wno-restrict") set_target_properties(protobuf-lite PROPERTIES COMPILE_FLAGS "-Wno-deprecated-declarations -Wno-restrict") diff --git a/depends/lua/CMakeLists.txt b/depends/lua/CMakeLists.txt index efded915fc..e467e90df8 100644 --- a/depends/lua/CMakeLists.txt +++ b/depends/lua/CMakeLists.txt @@ -92,19 +92,20 @@ set_source_files_properties(${SRC_LIBLUA} PROPERTIES LANGUAGE CXX) # append headers to sources to make them show up in MSVC GUI list(APPEND SRC_LIBLUA ${HDR_LIBLUA}) -add_library(lua SHARED ${SRC_LIBLUA}) -target_link_libraries(lua ${LIBS}) +add_library(lua53 SHARED ${SRC_LIBLUA}) +add_library(lua ALIAS lua53) +target_link_libraries(lua53 ${LIBS}) if(MSVC) # need no space to prevent /FI from being stripped: https://github.com/DFHack/dfhack/issues/1455 - target_compile_options(lua PRIVATE "/FIdfhack_llimits.h") + target_compile_options(lua53 PRIVATE "/FIdfhack_llimits.h") else() - target_compile_options(lua PRIVATE -include dfhack_llimits.h) + target_compile_options(lua53 PRIVATE -include dfhack_llimits.h) set_source_files_properties(src/lstring.c PROPERTIES COMPILE_FLAGS "-Wno-stringop-overflow") endif() -install(TARGETS lua +install(TARGETS lua53 LIBRARY DESTINATION ${DFHACK_LIBRARY_DESTINATION} RUNTIME DESTINATION ${DFHACK_LIBRARY_DESTINATION}) -ide_folder(lua "Depends") +ide_folder(lua53 "Depends") From f0feb0b4d66cbb77bfae669e6863154e6666cada Mon Sep 17 00:00:00 2001 From: Myk Taylor Date: Wed, 4 Sep 2024 08:38:55 -0700 Subject: [PATCH 2/2] set output name property instead of declaring an alias --- depends/CMakeLists.txt | 2 +- depends/lua/CMakeLists.txt | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/depends/CMakeLists.txt b/depends/CMakeLists.txt index 1bb46bc881..9dd3ac7e10 100644 --- a/depends/CMakeLists.txt +++ b/depends/CMakeLists.txt @@ -8,7 +8,7 @@ add_subdirectory(md5) add_subdirectory(protobuf) if(UNIX) - set_target_properties(lua53 PROPERTIES COMPILE_FLAGS "-Wno-deprecated-declarations -Wno-deprecated-enum-enum-conversion") + set_target_properties(lua PROPERTIES COMPILE_FLAGS "-Wno-deprecated-declarations -Wno-deprecated-enum-enum-conversion") set_target_properties(protoc PROPERTIES COMPILE_FLAGS "-Wno-deprecated-declarations -Wno-restrict") set_target_properties(protoc-bin PROPERTIES COMPILE_FLAGS "-Wno-deprecated-declarations -Wno-restrict") set_target_properties(protobuf-lite PROPERTIES COMPILE_FLAGS "-Wno-deprecated-declarations -Wno-restrict") diff --git a/depends/lua/CMakeLists.txt b/depends/lua/CMakeLists.txt index e467e90df8..116c7a22af 100644 --- a/depends/lua/CMakeLists.txt +++ b/depends/lua/CMakeLists.txt @@ -92,20 +92,20 @@ set_source_files_properties(${SRC_LIBLUA} PROPERTIES LANGUAGE CXX) # append headers to sources to make them show up in MSVC GUI list(APPEND SRC_LIBLUA ${HDR_LIBLUA}) -add_library(lua53 SHARED ${SRC_LIBLUA}) -add_library(lua ALIAS lua53) -target_link_libraries(lua53 ${LIBS}) +add_library(lua SHARED ${SRC_LIBLUA}) +set_target_properties(lua PROPERTIES OUTPUT_NAME lua53) +target_link_libraries(lua ${LIBS}) if(MSVC) # need no space to prevent /FI from being stripped: https://github.com/DFHack/dfhack/issues/1455 - target_compile_options(lua53 PRIVATE "/FIdfhack_llimits.h") + target_compile_options(lua PRIVATE "/FIdfhack_llimits.h") else() - target_compile_options(lua53 PRIVATE -include dfhack_llimits.h) + target_compile_options(lua PRIVATE -include dfhack_llimits.h) set_source_files_properties(src/lstring.c PROPERTIES COMPILE_FLAGS "-Wno-stringop-overflow") endif() -install(TARGETS lua53 +install(TARGETS lua LIBRARY DESTINATION ${DFHACK_LIBRARY_DESTINATION} RUNTIME DESTINATION ${DFHACK_LIBRARY_DESTINATION}) -ide_folder(lua53 "Depends") +ide_folder(lua "Depends")