forked from rubenwardy/NodeBoxEditor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
65 lines (58 loc) · 1.18 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
# Set up project
cmake_minimum_required(VERSION 2.6)
project(NodeBoxGenerator)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/")
# Dependancies
find_package(Irrlicht REQUIRED)
find_package(ZLIB REQUIRED)
find_package(X11 REQUIRED)
find_package(OpenGL REQUIRED)
find_package(JPEG REQUIRED)
find_package(BZip2 REQUIRED)
find_package(PNG REQUIRED)
# Source files
set(NBGEN_SRC
main.cpp
Configuration.cpp
Editor.cpp
EditorState.cpp
LUAFileParser.cpp
MenuState.cpp
NBEditor.cpp
NBEFileParser.cpp
Node.cpp
NodeBox.cpp
Project.cpp
)
# Include Directories
include_directories(
${PROJECT_BINARY_DIR}
${IRRLICHT_INCLUDE_DIR}
${ZLIB_INCLUDE_DIR}
${CMAKE_BUILD_TYPE}
${X11_INCLUDE_DIR}
${OPENGL_INCLUDE_DIR}
${PNG_INCLUDE_DIR}
)
add_executable(${PROJECT_NAME} ${NBGEN_SRC})
target_link_libraries(
${PROJECT_NAME}
${IRRLICHT_LIBRARY}
${ZLIB_LIBRARIES}
${X11_LIBRARIES}
${OPENGL_LIBRARIES}
${JPEG_LIBRARIES}
${BZIP2_LIBRARIES}
${PNG_LIBRARIES}
)
set_target_properties(${PROJECT_NAME}
PROPERTIES
OUTPUT_NAME NodeBoxEditor
)
# Install DLLs
if(WIN32)
if(DEFINED IRRLICHT_DLL)
message(Installing irrlicht dll)
install(FILES ${IRRLICHT_DLL})
endif()
endif()