These are chat archives for ChaiScript/ChaiScript

20th
Dec 2018
vocaviking
@vocaviking
Dec 20 2018 10:47
@StanEpp This part I did using git submodules, it works fine.
vocaviking
@vocaviking
Dec 20 2018 10:54

My problem is, that I have something like:

ace/
    lib/
        chaiscript/
        spdlog/
        libA/  --> uses chaiscript and spdlog
        libB/  --> uses chaiscript and spdlog
    src/
        main.cpp  --> uses libA and libB
    CMakeLists.txt

How can I do this using cmake? In the case of other header-only libraries like spdlog, I simply write the following project file:

    cmake_minimum_required(VERSION 3.1...3.11)
    project(ace VERSION 5.0.0)
    add_subdirectory(lib/spdlog/)
    target_link_libraries(ace PRIVATE libA)
    target_link_libraries(ace PRIVATE libB)

And inside the libraries I have:

    cmake_minimum_required(VERSION 3.1...3.11)
    project(libA VERSION 1.0.0)
    target_link_libraries(libA PRIVATE spdlog)