-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathCMakeLists.txt
53 lines (42 loc) · 1.14 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
cmake_minimum_required (VERSION 3.5)
project (ZEngine)
# TODO: Figure out the build pipeline for user C# projects.
# For now we just copy the user's scripts into the ZEngine-Interop project.
set(ZENGINE_GAME_PROJECT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/ZEngine-Editor/ProjectTemplate)
# Policies for SWIG to work correctly.
# TODO: Write better documentation for this.
if (POLICY CMP0122)
cmake_policy(SET CMP0122 NEW)
endif()
if (POLICY CMP0078)
cmake_policy(SET CMP0078 NEW)
endif()
if (POLICY CMP0086)
cmake_policy(SET CMP0086 NEW)
endif()
# Include SWIG module (for generating C# code).
include(UseSWIG)
# Include platform specific configurations
if (IOS)
include(iOS.cmake)
elseif (WIN32)
include(Windows.cmake)
elseif (UNIX AND NOT APPLE)
include(Linux.cmake)
elseif (APPLE)
include(MacOS.cmake)
endif()
# BGFX (and shaderc)
add_subdirectory (3rdparty/bgfx.cmake)
set_property(TARGET shaderc PROPERTY ENABLE_EXPORTS 1)
###
# ZEngine
###
# Core library
add_subdirectory (ZEngine-Core)
if (NOT IOS)
# Editor (mobile not supported for obvious reasons)
add_subdirectory (ZEngine-Editor)
endif()
# Player
add_subdirectory (ZEngine-Player)