Skip to content

Commit f3d9bdc

Browse files
committed
Merge pull request #193 from CovenantEyes/0.9-devel
Add needed Boost libs and OpenSSL headers to CMake config
2 parents d444579 + 26c681b commit f3d9bdc

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

CMakeLists.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ cmake_minimum_required(VERSION 2.8)
77
project(CPP-NETLIB)
88
set(Boost_USE_STATIC_LIBS ON)
99
set(Boost_USE_MULTI_THREADED ON)
10-
find_package( Boost 1.45.0 REQUIRED unit_test_framework system regex date_time thread filesystem program_options )
10+
find_package( Boost 1.45.0 REQUIRED unit_test_framework system regex date_time thread filesystem program_options chrono )
1111
find_package( OpenSSL )
1212
find_package( Threads )
1313
set(CMAKE_VERBOSE_MAKEFILE true)
@@ -18,6 +18,7 @@ endif()
1818

1919
if (OPENSSL_FOUND)
2020
add_definitions(-DBOOST_NETWORK_ENABLE_HTTPS)
21+
include_directories(${OPENSSL_INCLUDE_DIR})
2122
endif()
2223

2324
if (Boost_FOUND)
@@ -37,4 +38,8 @@ if (Boost_FOUND)
3738
add_subdirectory(libs/network/example)
3839
endif(Boost_FOUND)
3940

41+
if (MSVC)
42+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /bigobj")
43+
endif()
44+
4045
enable_testing()

libs/network/example/CMakeLists.txt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,17 @@ set(BOOST_CLIENT_LIBS
2828
${Boost_THREAD_LIBRARY}
2929
${Boost_DATE_TIME_LIBRARY}
3030
${Boost_REGEX_LIBRARY}
31-
${Boost_SYSTEM_LIBRARY})
31+
${Boost_SYSTEM_LIBRARY}
32+
${Boost_FILESYSTEM_LIBRARY}
33+
${Boost_CHRONO_LIBRARY})
3234

3335
set(BOOST_SERVER_LIBS
3436
${Boost_THREAD_LIBRARY}
3537
${Boost_SYSTEM_LIBRARY}
3638
${Boost_DATE_TIME_LIBRARY}
37-
${Boost_PROGRAM_OPTIONS_LIBRARY})
39+
${Boost_PROGRAM_OPTIONS_LIBRARY}
40+
${Boost_FILESYSTEM_LIBRARY}
41+
${Boost_CHRONO_LIBRARY})
3842

3943
target_link_libraries(http_client
4044
${BOOST_CLIENT_LIBS}

0 commit comments

Comments
 (0)