-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
67 lines (54 loc) · 1.84 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
cmake_minimum_required(VERSION 3.13)
project(SWGame
VERSION 0.0.1
LANGUAGES CXX)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src)
set (DEPENDENCY_DIR ${CMAKE_SOURCE_DIR}/lib)
set (SDL2DIR "${DEPENDENCY_DIR}/SDL2")
set (SDL2TTFDIR "${DEPENDENCY_DIR}/SDL2_ttf")
set (SDL2IMAGEDIR "${DEPENDENCY_DIR}/SDL2_image")
set (SDL2GFXDIR "${DEPENDENCY_DIR}/SDL2_gfx")
set (GALAXY_SDK_ROOT "${DEPENDENCY_DIR}/galaxy")
set (STEAMWORKS_SDK_ROOT "${DEPENDENCY_DIR}/steam")
set (STEAMWRAPPER_DIR "${DEPENDENCY_DIR}/GalaxySteamWrapper")
set (INSTALL_DIR ${CMAKE_SOURCE_DIR}/bin CACHE STRING "Instalation path")
set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/modules")
set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${INSTALL_DIR})
set (CMAKE_LIBRARY_OUTPUT_DIRECTORY ${INSTALL_DIR})
set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${INSTALL_DIR})
find_package (STEAMWORKS REQUIRED)
if (NOT STEAMWORKS_FOUND)
message (ERROR "Steamworks not found!")
endif()
include_directories (${STEAMWORKS_INCLUDE_DIR})
find_package (GALAXY REQUIRED)
if (NOT GALAXY_FOUND)
message (ERROR "Galaxy not found!")
endif()
include_directories (${GALAXY_INCLUDE_DIR})
find_package (SDL2 REQUIRED)
if (NOT SDL2_FOUND)
message (ERROR "SDL2 not found!")
endif()
include_directories (${SDL2_INCLUDE_DIR})
find_package (SDL2_ttf REQUIRED)
if (NOT SDL2TTF_FOUND)
message (ERROR "SDL2_ttf not found!")
endif()
include_directories (${SDL2TTF_INCLUDE_DIR})
find_package (SDL2_image REQUIRED)
if (NOT SDL2IMAGE_FOUND)
message (ERROR "SDL2_image not found!")
endif()
include_directories (${SDL2IMAGE_INCLUDE_DIR})
find_package (SDL2_gfx REQUIRED)
if (NOT SDL2GFX_FOUND)
message (ERROR "SDL2_gfx not found!")
endif()
include_directories (${SDL2GFX_INCLUDE_DIR})
if (MSVC)
add_definitions(/MP /std:c++latest)
else()
add_definitions(-std=c++1z -g -Wall -Wno-unused-function)
endif()
add_subdirectory(src)