-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
68 lines (54 loc) · 1.81 KB
/
CMakeLists.txt
File metadata and controls
68 lines (54 loc) · 1.81 KB
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
cmake_minimum_required(VERSION 3.10)
project(GeometrySlash C CXX)
# Setting parameters for raylib
set(BUILD_EXAMPLES OFF CACHE BOOL "" FORCE) # don't build the supplied examples
set(BUILD_GAMES OFF CACHE BOOL "" FORCE) # or games
set(OPENGL_VERSION "1.1" CACHE STRING "" FORCE)
add_executable(GeometrySlash
src/main.cpp
src/gamestate.cpp
src/gamestate.h
src/ingame.cpp
src/ingame.h
src/mainmenu.cpp
src/mainmenu.h
src/random.cpp
src/random.h
src/resultsscreen.cpp
src/resultsscreen.h
src/button.cpp
src/button.h
src/network.cpp
src/network.h
src/leaderboard.cpp
src/leaderboard.h
)
add_subdirectory(libs/raylib)
target_link_libraries(GeometrySlash PRIVATE raylib)
if(CMAKE_SYSTEM_NAME MATCHES "NintendoWii|NintendoGameCube")
find_package(SDL2 REQUIRED)
target_link_libraries(GeometrySlash PRIVATE SDL2::SDL2 SDL2::SDL2main aesnd opengx fat ogc m)
endif()
# only build libcurl if building with leaderboard support
if (SUPPORT_LEADERBOARD)
set(BUILD_CURL_EXE OFF CACHE BOOL "" FORCE) # don't build curl executable, only library
set(HTTP_ONLY ON CACHE BOOL "" FORCE) # only http support is needed
set(SSL_ENABLED ON)
set(ENABLE_UNIX_SOCKETS OFF) # not needed, we only use TCP/IP
set(CURL_USE_LIBSSH OFF) # not needed
set(CURL_USE_LIBSSH2 OFF) # not needed
set(CURL_USE_LIBPSL OFF) # not needed
set(CURL_DISABLE_CRYPTO_AUTH ON) # not needed (krb5, spnego)
set(BUILD_LIBCURL_DOCS OFF)
set(BUILD_MISC_DOCS OFF)
if(APPLE)
set(CURL_USE_SECTRANSP ON) # Deprecated darwinssl stuff from MacOS 10.3, no idea how to build with OpenSSL
endif()
if(WIN32)
set(CURL_USE_SCHANNEL ON) # Required for HTTPS
endif()
add_subdirectory(libs/curl)
target_compile_definitions(GeometrySlash PRIVATE SUPPORT_LEADERBOARD)
target_link_libraries(GeometrySlash PRIVATE libcurl)
endif()
#add_compile_options(-Wall -Wextra -pedantic)