From 9687e5ce626a1b4115275602ece70b1352a0fdae Mon Sep 17 00:00:00 2001 From: Gypsy Magic Date: Fri, 2 Jan 2026 17:46:25 +0100 Subject: [PATCH] Make library inkcpp_shared public Currently, using add_subdirectory or FetchContent requires linking inkcpp_shared to inkcpp_compiler to avoid missing headers (e.g., config.h). This is counterintuitive, because the installed library does not require this target, and it breaks the simple find_package(inkcpp) workflow. --- inkcpp/CMakeLists.txt | 4 ++-- inkcpp_compiler/CMakeLists.txt | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/inkcpp/CMakeLists.txt b/inkcpp/CMakeLists.txt index 0616b4cd..7c9ce0da 100644 --- a/inkcpp/CMakeLists.txt +++ b/inkcpp/CMakeLists.txt @@ -52,8 +52,8 @@ target_include_directories(inkcpp PUBLIC set_target_properties(inkcpp PROPERTIES PUBLIC_HEADER "${PUBLIC_HEADERS}") # Make sure the include directory is included -target_link_libraries(inkcpp_o PRIVATE inkcpp_shared) -target_link_libraries(inkcpp PRIVATE inkcpp_shared) +target_link_libraries(inkcpp_o PUBLIC inkcpp_shared) +target_link_libraries(inkcpp PUBLIC inkcpp_shared) # Make sure this project and all dependencies use the C++17 standard target_compile_features(inkcpp PUBLIC cxx_std_17) diff --git a/inkcpp_compiler/CMakeLists.txt b/inkcpp_compiler/CMakeLists.txt index b7293f44..daa2896b 100644 --- a/inkcpp_compiler/CMakeLists.txt +++ b/inkcpp_compiler/CMakeLists.txt @@ -22,8 +22,8 @@ target_include_directories(inkcpp_compiler PUBLIC FILE(GLOB PUBLIC_HEADERS "include/*") set_target_properties(inkcpp_compiler PROPERTIES PUBLIC_HEADER "${PUBLIC_HEADERS}") -target_link_libraries(inkcpp_compiler PRIVATE inkcpp_shared) -target_link_libraries(inkcpp_compiler_o PRIVATE inkcpp_shared) +target_link_libraries(inkcpp_compiler PUBLIC inkcpp_shared) +target_link_libraries(inkcpp_compiler_o PUBLIC inkcpp_shared) # Unreal installation list(REMOVE_ITEM SOURCES "json.hpp")