-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCMakeLists.txt
42 lines (28 loc) · 1.22 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
cmake_minimum_required(VERSION 2.6)
INCLUDE(CPack)
project(fanel)
set (fanel_VERSION 1.0)
find_package(OpenSSL)
find_package(Threads)
find_package(Boost 1.47.0 REQUIRED COMPONENTS system regex thread filesystem)
FILE(GLOB headers "${CMAKE_CURRENT_SOURCE_DIR}/fanel/*.h")
FILE(GLOB implementation "${CMAKE_CURRENT_SOURCE_DIR}/fanel/*.impl")
set(LIBRARY_DIRS ${Boost_LIBRARY_DIRS} ${OPENSSL_LIBRARY_DIRS})
set(LIBRARIES ${Boost_LIBRARIES} ${OPENSSL_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
foreach(arg ${LIBRARY_DIRS})
set(LINKER_FLAGS "${LINKER_FLAGS} ${arg}")
endforeach(arg ${LIBRARY_DIRS})
foreach(arg ${LIBRARIES})
set(LINKER_FLAGS "${LINKER_FLAGS} ${arg}")
endforeach(arg ${LIBRARIES})
link_directories ( ${LIBRARY_DIRS} )
link_libraries ( ${LIBRARIES} )
include_directories ( fanel )
INSTALL(FILES ${headers} DESTINATION include/fanel)
INSTALL(FILES ${implementation} DESTINATION include/fanel)
#set(CMAKE_CXX_COMPILER "/usr/bin/clang++")
set(CMAKE_CXX_FLAGS "-Wall -pedantic -std=c++0x")
CONFIGURE_FILE (${CMAKE_CURRENT_SOURCE_DIR}/fanel.pc.cmake ${CMAKE_CURRENT_SOURCE_DIR}/fanel.pc)
FILE(GLOB pkgconf "${CMAKE_CURRENT_SOURCE_DIR}/fanel.pc")
INSTALL(FILES ${pkgconf} DESTINATION lib/pkgconfig)
add_subdirectory(examples)