mirror of
https://github.com/thestk/stk
synced 2026-01-11 20:11:52 +00:00
include add_subdirectory for STK projects
This commit is contained in:
@@ -29,6 +29,7 @@ option(ENABLE_ASIO "Enable ASIO API support (windows only)" ON)
|
||||
option(ENABLE_DS "Enable DirectSound API support (windows only)" ON)
|
||||
option(ENABLE_WASAPI "Enable Windows Audio Session API support (windows only)" ON)
|
||||
option(ENABLE_CORE "Enable CoreAudio API support (mac only)" ON)
|
||||
option(COMPILE_PROJECTS "Compile all the example projects" OFF)
|
||||
|
||||
include_directories("./include")
|
||||
file(GLOB STK_SRC "./src/*.cpp") # GLOB instead of GLOB_RECURSE as the asio depends on system
|
||||
@@ -97,3 +98,11 @@ endif()
|
||||
# if(CMAKE_CXX_BYTE_ORDER STREQUAL LITTLE_ENDIAN)
|
||||
# target_compile_definitions(stk PUBLIC __LITTLE_ENDIAN__)
|
||||
# endif()
|
||||
|
||||
if(COMPILE_PROJECTS)
|
||||
add_subdirectory(projects/examples)
|
||||
add_subdirectory(projects/eguitar)
|
||||
add_subdirectory(projects/demo)
|
||||
add_subdirectory(projects/effects)
|
||||
add_subdirectory(projects/ragamatic)
|
||||
endif()
|
||||
9
projects/demo/CMakeLists.txt
Normal file
9
projects/demo/CMakeLists.txt
Normal file
@@ -0,0 +1,9 @@
|
||||
project(demo)
|
||||
|
||||
file(GLOB DEMO_SRC "./*.cpp")
|
||||
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${PROJECT_SOURCE_DIR}")
|
||||
|
||||
add_executable(stk-demo "demo.cpp" "utilities.cpp")
|
||||
target_include_directories(stk-demo PRIVATE "./")
|
||||
target_link_libraries(stk-demo PUBLIC stk)
|
||||
9
projects/effects/CMakeLists.txt
Normal file
9
projects/effects/CMakeLists.txt
Normal file
@@ -0,0 +1,9 @@
|
||||
project(effects)
|
||||
|
||||
file(GLOB EFFECTS_SRC "./*.cpp")
|
||||
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${PROJECT_SOURCE_DIR}")
|
||||
|
||||
add_executable(${PROJECT_NAME} ${EFFECTS_SRC})
|
||||
target_include_directories(${PROJECT_NAME} PRIVATE "./")
|
||||
target_link_libraries(${PROJECT_NAME} PUBLIC stk)
|
||||
9
projects/eguitar/CMakeLists.txt
Normal file
9
projects/eguitar/CMakeLists.txt
Normal file
@@ -0,0 +1,9 @@
|
||||
project(eguitar)
|
||||
|
||||
file(GLOB EGUITAR_SRC "./*.cpp")
|
||||
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${PROJECT_SOURCE_DIR}")
|
||||
|
||||
add_executable(${PROJECT_NAME} ${EGUITAR_SRC})
|
||||
target_include_directories(${PROJECT_NAME} PRIVATE "./")
|
||||
target_link_libraries(${PROJECT_NAME} PUBLIC stk)
|
||||
11
projects/examples/CMakeLists.txt
Normal file
11
projects/examples/CMakeLists.txt
Normal file
@@ -0,0 +1,11 @@
|
||||
project(examples)
|
||||
|
||||
file(GLOB EXAMPLE_SRC "./*.cpp")
|
||||
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${PROJECT_SOURCE_DIR}")
|
||||
|
||||
foreach(src ${EXAMPLE_SRC})
|
||||
get_filename_component(src_bin ${src} NAME_WE)
|
||||
add_executable(${src_bin} ${src})
|
||||
target_link_libraries(${src_bin} PUBLIC stk)
|
||||
endforeach()
|
||||
9
projects/ragamatic/CMakeLists.txt
Normal file
9
projects/ragamatic/CMakeLists.txt
Normal file
@@ -0,0 +1,9 @@
|
||||
project(ragamat)
|
||||
|
||||
file(GLOB RAGMATIC_SRC "./*.cpp")
|
||||
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${PROJECT_SOURCE_DIR}")
|
||||
|
||||
add_executable(${PROJECT_NAME} ${RAGMATIC_SRC})
|
||||
target_include_directories(${PROJECT_NAME} PRIVATE "./")
|
||||
target_link_libraries(${PROJECT_NAME} PUBLIC stk)
|
||||
Reference in New Issue
Block a user