Tidy up CMakeLists.txt

This commit is contained in:
Vinnie Falco
2017-06-20 17:16:07 -07:00
parent 3ff585d36e
commit 26b5e91725
14 changed files with 41 additions and 45 deletions

View File

@@ -72,6 +72,7 @@ find_package(OpenSSL)
if (OPENSSL_FOUND) if (OPENSSL_FOUND)
add_definitions (-DBEAST_USE_OPENSSL=1) add_definitions (-DBEAST_USE_OPENSSL=1)
else() else()
add_definitions (-DBEAST_USE_OPENSSL=0) add_definitions (-DBEAST_USE_OPENSSL=0)
message("OpenSSL not found.") message("OpenSSL not found.")
@@ -149,6 +150,10 @@ include_directories (.)
include_directories (extras) include_directories (extras)
include_directories (include) include_directories (include)
if (OPENSSL_FOUND)
include_directories (${OPENSSL_INCLUDE_DIR})
endif()
set(ZLIB_SOURCES set(ZLIB_SOURCES
${PROJECT_SOURCE_DIR}/test/zlib/zlib-1.2.8/crc32.h ${PROJECT_SOURCE_DIR}/test/zlib/zlib-1.2.8/crc32.h
${PROJECT_SOURCE_DIR}/test/zlib/zlib-1.2.8/deflate.h ${PROJECT_SOURCE_DIR}/test/zlib/zlib-1.2.8/deflate.h

View File

@@ -1,6 +1,5 @@
# Part of Beast # Part of Beast
GroupSources(extras/beast extras)
GroupSources(include/beast beast) GroupSources(include/beast beast)
GroupSources(example/echo-op "/") GroupSources(example/echo-op "/")

View File

@@ -4,11 +4,12 @@ GroupSources(include/beast beast)
GroupSources(example/http-client-ssl "/") GroupSources(example/http-client-ssl "/")
include_directories(${OPENSSL_INCLUDE_DIR})
add_executable (http-client-ssl add_executable (http-client-ssl
${BEAST_INCLUDES} ${BEAST_INCLUDES}
http_client_ssl.cpp http_client_ssl.cpp
) )
target_link_libraries(http-client-ssl Beast ${OPENSSL_LIBRARIES}) target_link_libraries(http-client-ssl
Beast
${OPENSSL_LIBRARIES}
)

View File

@@ -1,6 +1,5 @@
# Part of Beast # Part of Beast
GroupSources(extras/beast extras)
GroupSources(include/beast beast) GroupSources(include/beast beast)
GroupSources(example/http-client "/") GroupSources(example/http-client "/")

View File

@@ -1,6 +1,5 @@
# Part of Beast # Part of Beast
GroupSources(extras/beast extras)
GroupSources(include/beast beast) GroupSources(include/beast beast)
GroupSources(example/http-crawl "/") GroupSources(example/http-crawl "/")

View File

@@ -4,10 +4,6 @@ GroupSources(include/beast beast)
GroupSources(example/server-framework "/") GroupSources(example/server-framework "/")
if (OPENSSL_FOUND)
include_directories(${OPENSSL_INCLUDE_DIR})
endif()
add_executable (server-framework add_executable (server-framework
${BEAST_INCLUDES} ${BEAST_INCLUDES}
${SERVER_INCLUDES} ${SERVER_INCLUDES}

View File

@@ -4,11 +4,12 @@ GroupSources(include/beast beast)
GroupSources(example/websocket-client-ssl "/") GroupSources(example/websocket-client-ssl "/")
include_directories(${OPENSSL_INCLUDE_DIR})
add_executable (websocket-client-ssl add_executable (websocket-client-ssl
${BEAST_INCLUDES} ${BEAST_INCLUDES}
websocket_client_ssl.cpp websocket_client_ssl.cpp
) )
target_link_libraries(websocket-client-ssl Beast ${OPENSSL_LIBRARIES}) target_link_libraries(websocket-client-ssl
Beast
${OPENSSL_LIBRARIES}
)

View File

@@ -1,6 +1,5 @@
# Part of Beast # Part of Beast
GroupSources(extras/beast extras)
GroupSources(include/beast beast) GroupSources(include/beast beast)
GroupSources(example/websocket-client "/") GroupSources(example/websocket-client "/")

View File

@@ -13,6 +13,7 @@ if ((NOT "${VARIANT}" STREQUAL "coverage") AND
GroupSources(extras/beast extras) GroupSources(extras/beast extras)
GroupSources(include/beast beast) GroupSources(include/beast beast)
GroupSources(test "/") GroupSources(test "/")
add_executable (lib-tests add_executable (lib-tests

View File

@@ -2,6 +2,7 @@
GroupSources(extras/beast extras) GroupSources(extras/beast extras)
GroupSources(include/beast beast) GroupSources(include/beast beast)
GroupSources(test/benchmarks "/") GroupSources(test/benchmarks "/")
GroupSources(test/http "/") GroupSources(test/http "/")

View File

@@ -3,6 +3,7 @@
GroupSources(examples examples) GroupSources(examples examples)
GroupSources(extras/beast extras) GroupSources(extras/beast extras)
GroupSources(include/beast beast) GroupSources(include/beast beast)
GroupSources(test/core "/") GroupSources(test/core "/")
add_executable (core-tests add_executable (core-tests

View File

@@ -6,10 +6,6 @@ GroupSources(include/beast beast)
GroupSources(test/server "/") GroupSources(test/server "/")
if (OPENSSL_FOUND)
include_directories(${OPENSSL_INCLUDE_DIR})
endif()
add_executable (server-test add_executable (server-test
${BEAST_INCLUDES} ${BEAST_INCLUDES}
${SERVER_INCLUDES} ${SERVER_INCLUDES}

View File

@@ -2,13 +2,10 @@
GroupSources(extras/beast extras) GroupSources(extras/beast extras)
GroupSources(include/beast beast) GroupSources(include/beast beast)
GroupSources(test/websocket "/") GroupSources(test/websocket "/")
include_directories(../../example/) #include_directories(../../example/)
if (OPENSSL_FOUND)
include_directories(${OPENSSL_INCLUDE_DIR})
endif()
add_executable (websocket-tests add_executable (websocket-tests
${BEAST_INCLUDES} ${BEAST_INCLUDES}

View File

@@ -2,6 +2,7 @@
GroupSources(extras/beast extras) GroupSources(extras/beast extras)
GroupSources(include/beast beast) GroupSources(include/beast beast)
GroupSources(test/zlib "/") GroupSources(test/zlib "/")
if (MSVC) if (MSVC)