From 53fe932be442d6f8bef5147c384f453ff8ed4119 Mon Sep 17 00:00:00 2001 From: IohannRabeson Date: Tue, 8 Jun 2021 23:00:43 -0400 Subject: [PATCH] Properly create a library called Chaiscript. This allows to properly use Chaiscript as submodule with CMake. --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index eaedd07b..7eef73e3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -248,7 +248,9 @@ set(CHAISCRIPT_LIBS stdlib parser) add_executable(chai src/main.cpp ${Chai_INCLUDES}) target_link_libraries(chai ${LIBS} ${CHAISCRIPT_LIBS}) -target_include_directories(chai PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include) + +add_library(chaiscript INTERFACE) +target_include_directories(chaiscript INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/include) if(BUILD_SAMPLES) add_executable(sanity_checks src/sanity_checks.cpp)