-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
76 lines (63 loc) · 2.03 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
cmake_minimum_required(VERSION 3.14)
project(wray C)
set(CMAKE_C_STANDARD 99)
set(CMAKE_WARN_DEPRECATED OFF CACHE BOOL "" FORCE)
if(MSVC)
add_compile_options(/wd4244 /wd4267 /wd4996)
endif()
include(FetchContent)
set(FETCHCONTENT_QUIET FALSE)
set(CUSTOMIZE_BUILD ON CACHE BOOL "" FORCE)
set(SUPPORT_MODULE_RMODELS OFF CACHE BOOL "" FORCE)
set(SUPPORT_CAMERA_SYSTEM OFF CACHE BOOL "" FORCE)
set(SUPPORT_GESTURES_SYSTEM OFF CACHE BOOL "" FORCE)
set(SUPPORT_RPRAND_GENERATOR OFF CACHE BOOL "" FORCE)
set(SUPPORT_MOUSE_GESTURES OFF CACHE BOOL "" FORCE)
set(SUPPORT_SCREEN_CAPTURE OFF CACHE BOOL "" FORCE)
set(SUPPORT_GIF_RECORDING OFF CACHE BOOL "" FORCE)
set(SUPPORT_FILEFORMAT_DDS OFF CACHE BOOL "" FORCE)
set(SUPPORT_FILEFORMAT_HDR OFF CACHE BOOL "" FORCE)
set(SUPPORT_FILEFORMAT_BMP ON CACHE BOOL "" FORCE)
set(SUPPORT_FILEFORMAT_JPG ON CACHE BOOL "" FORCE)
set(SUPPORT_FILEFORMAT_GIF OFF CACHE BOOL "" FORCE)
set(SUPPORT_FILEFORMAT_QOI OFF CACHE BOOL "" FORCE)
set(SUPPORT_FILEFORMAT_XM OFF CACHE BOOL "" FORCE)
set(SUPPORT_FILEFORMAT_MOD OFF CACHE BOOL "" FORCE)
set(SUPPORT_FILEFORMAT_QOA OFF CACHE BOOL "" FORCE)
set(SUPPORT_FILEFORMAT_FLAC ON CACHE BOOL "" FORCE)
FetchContent_Declare(raylib
GIT_REPOSITORY https://github.com/raysan5/raylib.git
GIT_TAG 5.0
GIT_PROGRESS TRUE
)
FetchContent_MakeAvailable(raylib)
FetchContent_Declare(enet
GIT_REPOSITORY https://github.com/lsalzman/enet.git
GIT_TAG v1.3.18
GIT_PROGRESS TRUE
)
FetchContent_MakeAvailable(enet)
include_directories(${enet_SOURCE_DIR}/include)
set(SOURCES
src/api.c
src/net.c
src/util.c
src/wray.c
src/lib/argparse/argparse.c
src/lib/map/map.c
src/lib/microui/microui.c
src/lib/naett/naett.c
src/lib/wren/wren.c
src/lib/zip/zip.c
)
if(WIN32)
list(APPEND SOURCES assets/wray.rc)
endif()
add_executable(${PROJECT_NAME} ${SOURCES})
target_link_libraries(${PROJECT_NAME} raylib enet)
if(WIN32)
target_link_libraries(${PROJECT_NAME} winhttp ws2_32)
endif()
if(UNIX)
target_link_libraries(${PROJECT_NAME} curl)
endif()