From 8d72e9dacb3e8474264c62eba2f65eea21ad1f28 Mon Sep 17 00:00:00 2001 From: royna2544 Date: Fri, 4 Oct 2024 20:15:33 +0900 Subject: [PATCH] Try to fix jsoncpp header not being public --- CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b3e4408e..83b98ec8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -88,7 +88,6 @@ endif() if (NOT TARGET jsoncpp_lib) message(FATAL_ERROR "Jsoncpp is not available") endif() -include_directories(${jsoncpp_INCLUDE_DIRS} ${JSONCPP_PKG_INCLUDE_DIRS}) ## boost set(Boost_USE_MULTITHREADED ON) @@ -122,6 +121,8 @@ endif() # building project add_library(${PROJECT_NAME} ${SRC_LIST}) + +target_include_directories(${PROJECT_NAME} PUBLIC ${jsoncpp_INCLUDE_DIRS} ${JSONCPP_PKG_INCLUDE_DIRS}) target_include_directories(${PROJECT_NAME} PUBLIC $ $)