-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
31 lines (24 loc) · 1007 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.8)
project(BetaC)
find_package(SDL2 REQUIRED)
if(APPLE OR WIN32)
find_package(SDL2_image REQUIRED)
endif()
if(APPLE)
find_package(OpenGL REQUIRED)
set(FLAGS ${FLAGS} "-Wno-deprecated")
endif()
file(COPY ${CMAKE_SOURCE_DIR}/resources/ DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/src/rd-132211)
file(COPY ${CMAKE_SOURCE_DIR}/resources/ DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/src/rd-132328)
file(COPY ${CMAKE_SOURCE_DIR}/resources/ DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/src/rd-160052)
file(COPY ${CMAKE_SOURCE_DIR}/resources/ DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/src/rd-161348)
file(COPY ${CMAKE_SOURCE_DIR}/resources/ DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/src/c0.0.12a-dev)
if(WIN32)
link_libraries(SDL2::SDL2 SDL2_image::SDL2_image opengl32 glu32 z)
elseif(APPLE)
add_compile_options(${FLAGS})
link_libraries(SDL2::SDL2 SDL2_image::SDL2_image z "-framework OpenGL")
elseif(UNIX)
link_libraries(SDL2::SDL2 SDL2_image m GL GLU z)
endif()
add_subdirectory(src)