-
Notifications
You must be signed in to change notification settings - Fork 5
/
CMakeLists.txt
executable file
·72 lines (45 loc) · 2.63 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
#######################################################################
# BOOST make file copied from #
# https://github.com/patmarion/boost-build/blob/master/CMakeLists.txt #
#######################################################################
cmake_minimum_required(VERSION 2.8)
project(boost-android)
#find patched boost directory
set(boost_root ${CMAKE_CURRENT_SOURCE_DIR} CACHE PATH "")
set(BOOST_INCLUDEDIR "" CACHE PATH "")
set(BOOST_LIBRARYDIR "" CACHE PATH "")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DNO_BZIP2" )
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DNO_BZIP2")
include_directories(${boost_root} )
file(GLOB lib_srcs ${boost_root}/libs/system/src/*.cpp)
add_library( boost_system ${lib_srcs})
file(GLOB lib_srcs ${boost_root}/libs/filesystem/src/*.cpp)
add_library( boost_filesystem ${lib_srcs})
set(lib_dir ${boost_root}/libs/iostreams/src)
set(lib_srcs ${lib_dir}/file_descriptor.cpp ${lib_dir}/gzip.cpp ${lib_dir}/mapped_file.cpp ${lib_dir}/zlib.cpp)
add_library( boost_iostreams ${lib_srcs})
file(GLOB lib_srcs ${boost_root}/libs/program_options/src/*.cpp)
add_library( boost_program_options ${lib_srcs})
file(GLOB lib_srcs ${boost_root}/libs/regex/src/*.cpp)
add_library( boost_regex ${lib_srcs})
file(GLOB lib_srcs ${boost_root}/libs/signals/src/*.cpp)
add_library( boost_signals ${lib_srcs})
file(GLOB lib_srcs ${boost_root}/libs/thread/src/pthread/*.cpp)
add_library( boost_thread ${lib_srcs})
file(GLOB lib_srcs ${boost_root}/libs/date_time/src/gregorian/*.cpp ${boost_root}/libs/date_time/src/posix_time/*.cpp)
add_library(boost_date_time ${lib_srcs})
target_link_libraries(boost_filesystem boost_system)
#set(Boost_INCLUDE_DIRS ${boost_root})
#set(Boost_LIBRARIES boost_filesystem boost_system boost_program_options boost_iostreams boost_date_time)
#set(Boost_LINK_DIRS ${LIBRARY_OUTPUT_PATH})
#configure_file(${CMAKE_SOURCE_DIR}/BoostConfig.cmake.in
# ${CMAKE_BINARY_DIR}/BoostConfig.cmake @ONLY)
install(DIRECTORY ${boost_root}/boost DESTINATION ${CMAKE_INSTALL_PREFIX}/include)
install(TARGETS boost_system DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)
install(TARGETS boost_filesystem DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)
install(TARGETS boost_program_options DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)
install(TARGETS boost_iostreams DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)
install(TARGETS boost_regex DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)
install(TARGETS boost_signals DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)
install(TARGETS boost_thread DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)
install(TARGETS boost_date_time DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)