-
Notifications
You must be signed in to change notification settings - Fork 10
/
CMakeLists.txt
60 lines (46 loc) · 1.58 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
PROJECT(botui)
CMAKE_MINIMUM_REQUIRED(VERSION 2.6.0)
FIND_PACKAGE(Qt4 REQUIRED)
SET(INCLUDE ${botui_SOURCE_DIR}/include)
SET(RC ${botui_SOURCE_DIR}/rc)
SET(SRC ${botui_SOURCE_DIR}/src)
SET(UI ${botui_SOURCE_DIR}/ui)
SET(DEVICES ${botui_SOURCE_DIR}/devices)
SET(KOVAN ${DEVICES}/kovan)
SET(SIMULATOR ${DEVICES}/simulator)
INCLUDE_DIRECTORIES(
${CMAKE_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/src
${botui_SOURCE_DIR}
${botui_BINARY_DIR}
${KOVAN}/include
${SIMULATOR}/include
${INCLUDE}
)
SET(QT_USE_QTDECLARATIVE TRUE)
SET(QT_USE_QTNETWORK TRUE)
SET(QT_USE_QTDBUS TRUE)
INCLUDE(${QT_USE_FILE})
FILE(GLOB INCLUDES ${INCLUDE}/*.h ${KOVAN}/include/*.h ${SIMULATOR}/include/*.h)
FILE(GLOB SOURCES ${SRC}/*.cpp ${KOVAN}/src/*.cpp ${SIMULATOR}/src/*.cpp)
FILE(GLOB UIS ${UI}/*)
SET(botui_SRCS_CXX ${SOURCES})
SET(botui_UI ${UIS})
SET(botui_MOC_SRCS ${INCLUDES})
SET(botui_QRC_FILES ${RC}/icons.qrc ${RC}/construction.qrc ${RC}/qml.qrc)
QT4_WRAP_CPP(botui_SRCS_CXX ${botui_MOC_SRCS})
QT4_WRAP_UI(botui_SRCS_CXX ${botui_UI})
QT4_ADD_RESOURCES(botui_SRCS_CXX ${botui_QRC_FILES})
SET(CMAKE_CXX_FLAGS "-Wall")
IF(APPLE)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -arch x86_64 -g")
LINK_DIRECTORIES(/Library/Frameworks/)
ADD_EXECUTABLE(botui ${botui_SRCS_CXX})
ELSEIF(UNIX)
ADD_EXECUTABLE(botui ${botui_SRCS_CXX})
ELSEIF(WIN32)
SET(CMAKE_CXX_FLAGS "-Wl,--enable-auto-import")
ADD_EXECUTABLE(botui WIN32 ${botui_SRCS_CXX})
ENDIF()
SET(EXECUTABLE_OUTPUT_PATH ${botui_SOURCE_DIR}/deploy)
TARGET_LINK_LIBRARIES(botui ${QT_LIBRARIES} easydevice kiss-compiler tinyarchive z opencv_core opencv_highgui opencv_imgproc kovan)