-
Notifications
You must be signed in to change notification settings - Fork 5
/
CMakeLists.txt
66 lines (49 loc) · 1.87 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
cmake_minimum_required(VERSION 2.8)
PROJECT(Apolo)
IF(WIN32)
INCLUDE_DIRECTORIES(C:/mrcore/include)
LINK_DIRECTORIES(C:/mrcore/lib)
ELSE(WIN32)
INCLUDE_DIRECTORIES(/usr/local/mrcore/include)
LINK_DIRECTORIES(/usr/local/mrcore/lib)
ENDIF(WIN32)
FIND_PACKAGE(wxWidgets COMPONENTS gl net aui adv xml core base)
IF(wxWidgets_FOUND)
INCLUDE(${wxWidgets_USE_FILE})
ELSE()
message(FATAL_ERROR "YOU SHOULD HAVE LOCALLY INSTALLED THE WXWIDGETS PACKAGE")
ENDIF()
IF(WIN32)
SET(RESOURCES "apolo.rc")
ELSE(WIN32)
SET(RESOURCES "")
ENDIF(WIN32)
file(GLOB ALL_SRC "${CMAKE_SOURCE_DIR}/*.cpp")
ADD_EXECUTABLE(APOLO ${ALL_SRC} ${RESOURCES})
IF(WIN32)
SET_TARGET_PROPERTIES(APOLO PROPERTIES
COMPILE_FLAGS "${wxWidgets_CXX_FLAGS} ${wxWidgets_DEFINITIONS}"
LINK_FLAGS "/SUBSYSTEM:WINDOWS")
SET_TARGET_PROPERTIES(APOLO PROPERTIES
COMPILE_FLAGS "/D _CRT_SECURE_NO_WARNINGS"
LINK_FLAGS "/SUBSYSTEM:WINDOWS")
ENDIF(WIN32)
IF(WIN32)
TARGET_LINK_LIBRARIES(APOLO debug mrcore_d ${wxWidgets_LIBRARIES})
TARGET_LINK_LIBRARIES(APOLO optimized mrcore ${wxWidgets_LIBRARIES})
ELSE(WIN32) #LINUX
TARGET_LINK_LIBRARIES(APOLO mrcore ${OPENGL_LIBRARIES} ${wxWidgets_LIBRARIES})
ENDIF(WIN32)
IF(NOT MINGW)
ADD_SUBDIRECTORY(apoloMex)
ENDIF()
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/bitmaps/ApoloImage.bmp DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
message("DIRECTORIO RUNTIME: ${RUNTIME_OUTPUT_DIRECTORY_DEBUG}")
# file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/bitmaps/ApoloImage.bmp DESTINATION ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
ADD_EXECUTABLE(DEMO_APOLO_PORT demoApoloPort/demoApoloPort.cpp apoloMessage.cpp)
IF(WIN32)
TARGET_LINK_LIBRARIES(DEMO_APOLO_PORT debug mrcore_d )
TARGET_LINK_LIBRARIES(DEMO_APOLO_PORT optimized mrcore )
ELSE(WIN32) #LINUX
TARGET_LINK_LIBRARIES(DEMO_APOLO_PORT mrcore ${OPENGL_LIBRARIES} ${wxWidgets_LIBRARIES})
ENDIF(WIN32)