-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeLists.txt
81 lines (58 loc) · 2.67 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
76
77
78
79
80
cmake_minimum_required (VERSION 2.6)
project (HuboAchTab)
###############
# Build configuration
set(CMAKE_INSTALL_PREFIX /usr )
set(CPACK_PACKAGE_NAME "hubo-ach-tab")
set(HACHT_MAJOR_VERSION "0")
set(HACHT_MINOR_VERSION "1")
set(HACHT_PATCH_VERSION "0")
set(PKG_DESC "HACHT is a DART/GRIP application which emulates the HUBO robot using ach.")
set(HACHT_VERSION "${HACHT_MAJOR_VERSION}.${HACHT_MINOR_VERSION}.${HACHT_PATCH_VERSION}")
set(PKG_EXTERNAL_DEPS "hubo-ach, hubo-ach-dev, ach, grip, dart, flann, ccd, fcl")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse2 -O3 -std=c++0x")
set(CMAKE_CXX_FLAGS_PROFILE "-pg" CACHE STRING "Profiling flags")
###############
# libraries and headers
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_INSTALL_PREFIX}/share/dart")
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_INSTALL_PREFIX}/share/grip")
# wxwidgets
set (wxWidgets_USE_LIBS base core gl)
find_package(wxWidgets REQUIRED)
# dart, grip
find_package(DARTExt REQUIRED)
find_package(DART REQUIRED CONFIG)
find_package(GRIP REQUIRED)
# ach, hubo-ach
find_library(ACH_LIBRARIES libach.so)
find_library(HUBO_LIBRARIES libhuboparams.so)
###############
# Actual build process
file (GLOB srcs "*.cpp")
file (GLOB hdrs "*.h")
include (${wxWidgets_USE_FILE})
include_directories(${DARTExt_INCLUDEDIR})
include_directories(${DART_INCLUDEDIR})
include_directories(${GRIP_INCLUDEDIR})
include_directories(${WXWIDGETS_SHARED_INCLUDE_DIRS})
link_directories(${CMAKE_SOURCE_DIR}/lib ${DART_LIBRARY_DIRS} ${GRIP_LIBRARY_DIRS} ${WXWIDGETS_SHARED_LIBRARY_DIRS})
add_executable (HuboAchTab ${srcs} ${hdrs})
target_link_libraries (HuboAchTab ${GRIP_LIBRARIES} ${DART_LIBRARIES} ${DARTExt_LIBRARIES} ${wxWidgets_LIBRARIES} ${Boost_LIBRARIES} ${HUBO_LIBRARIES} ${ACH_LIBRARIES})
###############
# Installation setup
install(TARGETS HuboAchTab RUNTIME DESTINATION bin)
install(DIRECTORY hubo-models DESTINATION share/hubo-ach-tab)
set(CPACK_SYSTEM_NAME "i386")
if( CMAKE_SIZEOF_VOID_P EQUAL 8 )
set(CPACK_SYSTEM_NAME "amd64")
endif()
set(CPACK_PACKAGE_VERSION_MAJOR ${HACHT_MAJOR_VERSION})
set(CPACK_PACKAGE_VERSION_MINOR ${HACHT_MINOR_VERSION})
set(CPACK_PACKAGE_VERSION_PATCH ${HACHT_PATCH_VERSION})
set(CPACK_DEBIAN_PACKAGE_DEPENDS "dart (>=2.3.0), libwxgtk2.8-dev, libach-dev, hubo-ach-dev")
set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}_${CPACK_PACKAGE_VERSION}_${CPACK_SYSTEM_NAME}")
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "Golems (http://github.com/golems/)")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${PKG_DESC}")
set(CPACK_PACKAGE_VENDOR "Humanoids Robotics Lab at GT")
include(CPack)