d2facfd8aa6feceed4b204fd3233a1a44330db96
[bpdyndnsd] / src / CMakeLists.txt
1 # Find Boost
2 find_package(Boost COMPONENTS program_options filesystem regex serialization system REQUIRED)
3
4 # Find CURL
5 find_package(CURL)
6
7 # Find OpenSSL (libcrypto)
8 find_package(OpenSSL)
9
10 # Includes
11 include_directories(    ${CMAKE_CURRENT_BINARY_DIR}
12                         ${CMAKE_CURRENT_SOURCE_DIR}
13                                    ${CURL_INCLUDES}
14                                    ${OPENSSL_INCLUDES}
15                                 )
16
17 configure_file ("${PROJECT_SOURCE_DIR}/src/version_info.h.in" "${PROJECT_BINARY_DIR}/src/version_info.h")
18
19 # C++ sources
20 set(cpp_sources
21         config.cpp
22         httphelper.cpp
23         ip_addr_helper.cpp
24         logger.cpp
25         main.cpp
26         net_helper.cpp
27         serializeservicecontainer.cpp
28         service.cpp
29         service_dhs.cpp
30         service_dyndns.cpp
31         service_dyns.cpp
32         service_easydns.cpp
33         service_gnudip.cpp
34         serviceholder.cpp
35         service_ods.cpp
36         service_tzo.cpp
37         service_zoneedit.cpp
38         tcp_service.cpp
39         updater.cpp
40         util.cpp
41     )
42
43 # C++ headers
44 set(cpp_headers
45         config.hpp
46         httphelper.hpp
47         ip_addr_helper.hpp
48         ip_service.hpp
49         logger.hpp
50         net_helper.hpp
51         serializeservicecontainer.hpp
52         service_dhs.hpp
53         service_dyndns.hpp
54         service_dyns.hpp
55         service_easydns.hpp
56         service_gnudip.hpp
57         service.hpp
58         serviceholder.hpp
59         service_ods.hpp
60         service_tzo.hpp
61         service_zoneedit.hpp
62         tcp_service.hpp
63         updater.hpp
64         util.hpp
65         version_info.h
66     )
67
68 add_executable(bpdyndnsd ${cpp_sources} ${cpp_headers})
69
70 # Dependencies
71 target_link_libraries(bpdyndnsd ${Boost_LIBRARIES} ${CURL_LIBRARIES} ${OPENSSL_LIBRARIES})
72
73 # Install
74 install(TARGETS bpdyndnsd DESTINATION bin)