-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
31 lines (26 loc) · 951 Bytes
/
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
cmake_minimum_required(VERSION 3.26)
project(streamrproxyclientexample CXX)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_BUILD_TYPE Release)
if(APPLE)
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64")
set(ARCH_DIR "arm64-osx")
else()
set(ARCH_DIR "x64-osx")
endif()
elseif(UNIX AND NOT APPLE)
if(CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64")
set(ARCH_DIR "arm64-linux")
else()
set(ARCH_DIR "x64-linux")
endif()
else()
message(FATAL_ERROR "Unsupported platform")
endif()
add_executable(publisherexample publisherexample.cpp)
target_include_directories(publisherexample
PRIVATE ${CMAKE_SOURCE_DIR}/../../dist/${ARCH_DIR}/include
PRIVATE ${CMAKE_SOURCE_DIR}/../../wrappers/cpp/include)
target_link_directories(publisherexample PRIVATE ${CMAKE_SOURCE_DIR}/../../dist/${ARCH_DIR}/lib/${CMAKE_BUILD_TYPE})
target_link_libraries(publisherexample streamrproxyclient)