-
Notifications
You must be signed in to change notification settings - Fork 12
/
CMakeLists.txt
57 lines (40 loc) · 1.37 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
cmake_minimum_required(VERSION 3.2)
project(riko4)
set($SDL2_gpu_PATH "${SDL2_gpu_PATH}" CACHE INTERNAL "SDL2_gpu" FORCE)
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules)
file(GLOB_RECURSE SOURCE_FILES src/*.cpp src/*.c src/*.h)
add_executable(riko4 ${SOURCE_FILES})
set_target_properties(riko4 PROPERTIES
CXX_STANDARD 17
CXX_STANDARD_REQUIRED ON)
find_package(SDL2 REQUIRED)
if (SDL2_FOUND)
include_directories(${SDL2_INCLUDE_DIR})
target_link_libraries(riko4 ${SDL2_LIBRARY})
endif ()
find_package(LuaJIT REQUIRED)
if (LUAJIT_FOUND)
include_directories(${LUAJIT_INCLUDE_DIR})
target_link_libraries(riko4 ${LUAJIT_LIBRARIES})
endif ()
find_package(SDL2_gpu REQUIRED)
if (SDL2_GPU_FOUND)
include_directories(${SDL2_gpu_INCLUDE_DIR})
target_link_libraries(riko4 ${SDL2_gpu_LIBRARY})
endif ()
find_package(CURL REQUIRED)
if (CURL_FOUND)
include_directories(${CURL_INCLUDE_DIR})
target_link_libraries(riko4 ${CURL_LIBRARY})
endif ()
find_package(CURLpp REQUIRED)
if (CURLPP_FOUND)
include_directories(${CURLPP_INCLUDE_DIR})
target_link_libraries(riko4 ${CURLPP_LIBRARY})
endif ()
include_directories(${CMAKE_SOURCE_DIR}/libs/include)
include_directories(${CMAKE_SOURCE_DIR}/src)
if (WIN32)
target_link_libraries(riko4 ${CMAKE_SOURCE_DIR}/src/resources/icon.res)
endif ()
install(TARGETS riko4 RUNTIME DESTINATION bin)