-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathCMakeLists.txt
77 lines (59 loc) · 2.15 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
cmake_minimum_required(VERSION 2.6)
INCLUDE(cmake/base.cmake)
INCLUDE(cmake/cpack.cmake)
INCLUDE(cmake2/FindqpOASES.cmake)
SET(PROJECT_NAME robust-equilibrium-lib)
SET(PROJECT_DESCRIPTION
"Utility classes for testing (robust) static equilibrium of a system in contact with the environment"
)
SET(PROJECT_URL "")
set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake/;${PROJECT_SOURCE_DIR}/cmake2/")
set(LIBRARY_OUTPUT_PATH "${PROJECT_SOURCE_DIR}/lib/")
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${PROJECT_SOURCE_DIR}/bin/")
set(SRC_DIR "${PROJECT_SOURCE_DIR}/src")
set(INCLUDE_DIR "${PROJECT_SOURCE_DIR}/include")
set(EXTERNAL_LIBRARY_DIR "${PROJECT_SOURCE_DIR}/external/lib")
if ( MSVC )
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DNOMINMAX")
endif()
SETUP_PROJECT()
option(BUILD_TESTS "Build tests" ON)
# Inhibit all warning messages.
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -w")
# remove flag that makes all warnings into errors
string (REPLACE "-Werror" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
MESSAGE( STATUS "CMAKE_CXX_FLAGS: " ${CMAKE_CXX_FLAGS} )
# Declare Headers
SET(${PROJECT_NAME}_HEADERS
include/robust-equilibrium-lib/config.hh
include/robust-equilibrium-lib/util.hh
include/robust-equilibrium-lib/logger.hh
include/robust-equilibrium-lib/solver_LP_abstract.hh
include/robust-equilibrium-lib/solver_LP_qpoases.hh
include/robust-equilibrium-lib/solver_LP_clp.hh
include/robust-equilibrium-lib/static_equilibrium.hh
include/robust-equilibrium-lib/stop-watch.hh
)
find_package(Eigen3)
if (EIGEN3_INCLUDE_DIR)
message(STATUS "Found Eigen3")
else()
message(STATUS "Eigen3 not found looking for Eigen2")
find_package(Eigen2 REQUIRED)
endif()
find_package(CDD REQUIRED)
find_package(CLP)
IF("${CLP_LIBRARY}" STREQUAL "CLP_LIBRARY-NOTFOUND")
message(STATUS "CLP_LIBRARY equal to CLP_LIBRARY-NOTFOUND so I assume CLP was not found ")
else()
message(STATUS "CLP library found, defining macro CLP_FOUND")
add_definitions(-DCLP_FOUND)
endif()
#SEARCH_FOR_QPOASES()
ADD_REQUIRED_DEPENDENCY("qpOASES")
add_subdirectory (src)
if(BUILD_TESTS)
add_subdirectory (test)
endif()
SETUP_PROJECT_FINALIZE()
SETUP_PROJECT_CPACK()