CMake support for building the demo added.

This commit is contained in:
offa
2019-12-16 18:49:06 +01:00
parent ab63e2c45b
commit fe38859715
2 changed files with 7 additions and 0 deletions

View File

@@ -2,6 +2,7 @@ cmake_minimum_required(VERSION 3.8)
project(indica VERSION 1.0.0 LANGUAGES CXX) project(indica VERSION 1.0.0 LANGUAGES CXX)
option(INDICA_BUILD_TESTS OFF) option(INDICA_BUILD_TESTS OFF)
option(SAMPLES "Build Samples" OFF) option(SAMPLES "Build Samples" OFF)
option(DEMO "Build Demo" OFF)
include(CMakePackageConfigHelpers) include(CMakePackageConfigHelpers)
include(GNUInstallDirs) include(GNUInstallDirs)
@@ -18,6 +19,10 @@ target_include_directories(indica INTERFACE
target_link_libraries(indica INTERFACE Threads::Threads) target_link_libraries(indica INTERFACE Threads::Threads)
if( DEMO )
add_subdirectory(demo)
endif()
if( SAMPLES ) if( SAMPLES )
add_subdirectory(samples) add_subdirectory(samples)
endif() endif()

2
demo/CMakeLists.txt Normal file
View File

@@ -0,0 +1,2 @@
add_executable(demo demo.cpp)
target_link_libraries(demo PRIVATE indica::indica)