-
Notifications
You must be signed in to change notification settings - Fork 3
/
CMakeLists.txt
37 lines (32 loc) · 1.32 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
cmake_minimum_required(VERSION 3.21)
# Let's choose a name and version for the extension. Change the name to your
# liking. The version should be a string like "1.0".
set(PROJECT_NAME "HelloGP-CPP") # Change this to your liking
project(${PROJECT_NAME} VERSION 1.0)
# Import the SDK
include(FetchContent)
FetchContent_Declare(
gp-sdk
GIT_REPOSITORY https://github.com/gigperformer/gp-sdk.git
GIT_TAG 0e95c145f69c73dbfc46324a70474c07fa61dd9f # v4.8
)
FetchContent_MakeAvailable(gp-sdk)
# Define our library including sources, include directories and dependencies
add_library(${PROJECT_NAME} SHARED)
target_sources(
${PROJECT_NAME} PRIVATE "${CMAKE_CURRENT_LIST_DIR}/src/LibMain.cpp"
"${CMAKE_CURRENT_LIST_DIR}/src/LibMain.h")
target_link_libraries(${PROJECT_NAME} PRIVATE gigperformer::sdk::cpp)
target_include_directories(${PROJECT_NAME}
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src)
# Language options: this will be a pure C++20 project
set_target_properties(
${PROJECT_NAME}
PROPERTIES CXX_STANDARD 20
CXX_STANDARD_REQUIRED ON
CXX_EXTENSIONS NO)
# Install the extension on the development machine
install(
TARGETS ${PROJECT_NAME}
LIBRARY DESTINATION "${GIG_PERFORMER_EXTENSIONS_DIRECTORY}"
RUNTIME DESTINATION "${GIG_PERFORMER_EXTENSIONS_DIRECTORY}")