-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
75 lines (59 loc) · 1.92 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
cmake_minimum_required(VERSION 2.8)
set(project_name tango)
project(${project_name})
set(CMAKE_OSX_ARCHITECTURES i386 CACHE STRING "do not build for 64-bit" FORCE)
set(ARCH i386)
set(MOAI_DEV ../moai-dev) # tangerinagames/moai-dev branch: joystick
set(${project_name}_include
include
lib/osx/glfw/include
${MOAI_DEV}/src
)
file(GLOB_RECURSE ${project_name}_sources src/*.cpp)
include_directories(${${project_name}_include})
# GLFW
add_library(glfw STATIC IMPORTED)
set_property(TARGET glfw PROPERTY IMPORTED_LOCATION lib/osx/glfw/libglfw.a)
# moai-osx
add_library(moai-osx STATIC IMPORTED)
set_property(TARGET moai-osx PROPERTY IMPORTED_LOCATION lib/osx/moai/libmoai-osx.a)
# moai-osx-zlcore
add_library(moai-osx-zlcore STATIC IMPORTED)
set_property(TARGET moai-osx-zlcore PROPERTY IMPORTED_LOCATION lib/osx/moai/libmoai-osx-zlcore.a)
# moai-osx-untz
add_library(moai-osx-untz STATIC IMPORTED)
set_property(TARGET moai-osx-untz PROPERTY IMPORTED_LOCATION lib/osx/moai/libmoai-osx-untz.a)
# moai-osx-luaext
add_library(moai-osx-luaext STATIC IMPORTED)
set_property(TARGET moai-osx-luaext PROPERTY IMPORTED_LOCATION lib/osx/moai/libmoai-osx-luaext.a)
# moai-osx-3rdparty
add_library(moai-osx-3rdparty STATIC IMPORTED)
set_property(TARGET moai-osx-3rdparty PROPERTY IMPORTED_LOCATION lib/osx/moai/libmoai-osx-3rdparty.a)
# frameworks
find_library(cocoa Cocoa)
find_library(iokit IOKit)
find_library(opengl OpenGL)
find_library(audiotoolbox AudioToolbox)
find_library(audiounit AudioUnit)
find_library(system system)
find_library(crypto crypto)
find_library(ssl ssl)
set(${project_name}_libraries
glfw
moai-osx
moai-osx-zlcore
moai-osx-untz
moai-osx-luaext
moai-osx-3rdparty
${cocoa}
${iokit}
${opengl}
${audiotoolbox}
${audiounit}
${system}
${crypto}
${ssl}
)
add_definitions(-std=c++11)
add_executable(${project_name} ${${project_name}_sources})
target_link_libraries(${project_name} ${${project_name}_libraries})