Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit8fdaa5a

Browse files
committed
examples are working with shared lib
'cppnetlib-utils-thread_pool' had to be added to the list of linkedlibraries for 'cppnetlib-http-server'. For the static case this was nota problem but in the shared case symbols were missing.Listing external shared or static libraries in 'add_dependencies' is notrequired. This CMake command is for adding dependencies betweendifferent targets defined by 'add_executable', 'add_library' or'add_custom_target'.
1 parenta9cc84a commit8fdaa5a

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

‎CMakeLists.txt‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@ find_package( ICU )
1616

1717
if(BUILD_SHARED_LIBS)
1818
set(Boost_USE_STATIC_LIBSOFF)
19-
# TODO/NOTE:
20-
# the examples won't compile with the current setup and shared libraries yet
21-
set(BUILD_EXAMPLESOFF)
2219
else()
2320
set(Boost_USE_STATIC_LIBSON)
2421
endif()

‎libs/network/src/CMakeLists.txt‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,6 @@ set(CPP-NETLIB_HTTP_SERVER_SRCS
9999
)
100100
add_library(cppnetlib-http-server ${CPP-NETLIB_HTTP_SERVER_SRCS})
101101
add_dependencies(cppnetlib-http-server
102-
# ${Boost_LIBRARIES}
103102
cppnetlib-constants
104103
cppnetlib-uri
105104
cppnetlib-message
@@ -108,6 +107,7 @@ add_dependencies(cppnetlib-http-server
108107
cppnetlib-http-message
109108
cppnetlib-http-message-wrappers
110109
cppnetlib-http-server-parsers
110+
cppnetlib-utils-thread_pool
111111
)
112112
target_link_libraries(cppnetlib-http-server
113113
${Boost_LIBRARIES}
@@ -119,6 +119,7 @@ target_link_libraries(cppnetlib-http-server
119119
cppnetlib-http-message
120120
cppnetlib-http-message-wrappers
121121
cppnetlib-http-server-parsers
122+
cppnetlib-utils-thread_pool
122123
)
123124
foreach (src_file ${CPP-NETLIB_HTTP_SERVER_SRCS})
124125
if (${CMAKE_CXX_COMPILER_ID}MATCHES GNU)
@@ -150,7 +151,6 @@ set(CPP-NETLIB_HTTP_CLIENT_SRCS
150151
http/client.cpp)
151152
add_library(cppnetlib-http-client ${CPP-NETLIB_HTTP_CLIENT_SRCS})
152153
add_dependencies(cppnetlib-http-client
153-
# ${Boost_LIBRARIES}
154154
cppnetlib-constants
155155
cppnetlib-uri
156156
cppnetlib-message

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp