tomlplusplus/examples/CMakeLists.txt
Claus Klein dcfab29e70
add cmake files to build and install header only library (#85)
* add cmake build and install support

export cmake config package too

* enable bootstap build without cmake config package

cleanup cmake list file
2021-02-02 18:45:59 +02:00

16 lines
452 B
CMake

cmake_minimum_required(VERSION 3.13...3.19)
project(Examples LANGUAGES CXX)
if(NOT TARGET tomlplusplus::tomlplusplus)
find_package(tomlplusplus REQUIRED)
endif()
add_executable(toml_to_json_transcoder toml_to_json_transcoder.cpp)
target_link_libraries(toml_to_json_transcoder PRIVATE tomlplusplus::tomlplusplus)
enable_testing()
add_test(NAME toml_to_json_transcoder
COMMAND toml_to_json_transcoder ${CMAKE_CURRENT_LIST_DIR}/example.toml
)