From 34e265a8016e083d9e5c0e4cbd55f8c018f23a20 Mon Sep 17 00:00:00 2001 From: Ryan Houdek Date: Tue, 7 Jan 2025 16:01:34 -0800 Subject: [PATCH] cmake: Adds some missing STATIC qualifiers Noticed this as I was scrolling through some cmake. Usually this doesn't matter as we declare `BUILD_SHARED_LIBS` as False/Off, but this can technically be overridden even when we don't want to. Updates the two definitions of `add_library` that was missing the static qualifier to ensure they generate the code we want. --- External/tiny-json/CMakeLists.txt | 2 +- ThunkLibs/Generator/CMakeLists.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/External/tiny-json/CMakeLists.txt b/External/tiny-json/CMakeLists.txt index 8cf0054eef..a0c619428a 100644 --- a/External/tiny-json/CMakeLists.txt +++ b/External/tiny-json/CMakeLists.txt @@ -1,3 +1,3 @@ set(NAME tiny-json) set(SRCS tiny-json.c) -add_library(${NAME} ${SRCS}) +add_library(${NAME} STATIC ${SRCS}) diff --git a/ThunkLibs/Generator/CMakeLists.txt b/ThunkLibs/Generator/CMakeLists.txt index 8214c558f5..5441ba04cc 100644 --- a/ThunkLibs/Generator/CMakeLists.txt +++ b/ThunkLibs/Generator/CMakeLists.txt @@ -11,7 +11,7 @@ if (NOT CLANG_RESOURCE_DIR) OUTPUT_STRIP_TRAILING_WHITESPACE) endif() -add_library(thunkgenlib analysis.cpp data_layout.cpp gen.cpp) +add_library(thunkgenlib STATIC analysis.cpp data_layout.cpp gen.cpp) target_include_directories(thunkgenlib INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) target_include_directories(thunkgenlib SYSTEM PUBLIC ${CLANG_INCLUDE_DIRS}) target_link_libraries(thunkgenlib PUBLIC clang-cpp LLVM)