-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
29 lines (24 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
CMAKE_MINIMUM_REQUIRED(VERSION 3.7)
PROJECT(PRT)
SET(CMAKE_CXX_STANDARD 20)
IF (EXISTS ${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
INCLUDE(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
CONAN_BASIC_SETUP()
ELSE ()
MESSAGE(WARNING "The file conanbuildinfo.cmake doesn't exist, you have to run conan install first")
ENDIF ()
IF (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
SET(OpenCLLib "-framework OpenCL")
SET(SDLLib "-framework AudioToolbox -framework CoreAudio -framework Carbon")
SET(SDLLib ${SDLLib} "-framework ForceFeedback -framework IOKit -framework Cocoa -framework CoreVideo")
SET(SDLLib ${SDLLib} iconv SDL2)
ELSE ()
FIND_PACKAGE(Threads)
SET(ExtraLib ${CMAKE_DL_LIBS} ${CMAKE_THREAD_LIBS_INIT})
SET(SDLLib SDL2)
SET(OpenCLLib OpenCL)
ENDIF ()
ADD_EXECUTABLE(PRT main.cc icosahedron.cc)
ADD_EXECUTABLE(CLTest CLTest.cc)
TARGET_LINK_LIBRARIES(PRT ${OpenCLLib} ${SDLLib} ${ExtraLib})
TARGET_LINK_LIBRARIES(CLTest ${OpenCLLib} ${SDLLib})