These are chat archives for ChaiScript/ChaiScript

Dec 2018
Dec 19 2018 09:55
Hi, I'm trying to import chaiscript using cmake, but I can't get the header files to work properly. Right now I'm doing it this way:
cmake_minimum_required(VERSION 3.1...3.11)
project(ace VERSION 5.0.0)
target_link_libraries(ace PRIVATE chaiscript)
What do I have to do to make this compile?
Arthur Brainville
Dec 19 2018 10:03
I use either include_directoires or target_include_directories for Chai. As it’s just a folder with a bunch of headers. Therés nothing to link against
« Link libraries » functions are for linking to .a, .lib, .so filles to your target. Nothing to do with headers.
Dec 19 2018 10:10
Sure. However, that's the recommendation I found for including proper cmake projects... add_subdirectory and link against it
This helps you to include chaiscript into several projects depending on it, without duplicating the code. (Something I actually would need.)
Dec 19 2018 11:13

I do it in my project like this:
Add an external_project

Just add it as a dependency to the project

As @Ybalrid already said there's nothing to link against. You just include the header files and are good to go.

I hope the code helps. Unfortunately I haven't touched the project in a while
Oliver Dain
Dec 19 2018 17:59
Hey - just posted a question on the forums ( and then discovered there's a chat channel too! Hoping I can get a quicker answer here as I'm kinda stuck right now. Any help would be greatly appreciated.