forked from zhixy/SolveAXXB
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
executable file
·37 lines (28 loc) · 1018 Bytes
/
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
cmake_minimum_required(VERSION 2.8)
project(SolveAXXB)
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
#set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_HOME_DIRECTORY}/bin)
file(GLOB SRC
axxb/*
)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
# Eigen
set(MIN_EIGEN_VERSION 3.2.0)
find_package(Eigen ${MIN_EIGEN_VERSION} REQUIRED)
if (EIGEN_FOUND)
message("-- Found Eigen version ${EIGEN_VERSION}: ${EIGEN_INCLUDE_DIRS}")
endif (EIGEN_FOUND)
include_directories(
${EIGEN_INCLUDE_DIRS}
)
add_library(SolveAXXB SHARED ${SRC})
## Specify libraries to link a library or executable target against
target_link_libraries(SolveAXXB
${EIGEN_LIBRARIES}
)
install(TARGETS SolveAXXB
LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib
ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_PREFIX}/include)
#install(FILES axxb/*.h DESTINATION ${CMAKE_INSTALL_PREFIX}/include)
install(DIRECTORY axxb/ DESTINATION include/SolveAXXB FILES_MATCHING PATTERN "*.h")