Skip to content

Commit 7648abc

Browse files
committed
build: fix Descent3 program link failure
In case httplibConfig.cmake is absent, there is still a link failure because -lcpp-httplib appears nowhere on the command-line. ``` /usr/include/c++/14/bits/unique_ptr.h:1077:(.text+0x7ae9): undefined reference to `httplib::Client::Client(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' /usr/lib64/gcc/x86_64-suse-linux/14/../../../../x86_64-suse-linux/bin/ld: /usr/include/c++/14/bits/unique_ptr.h:93:(.text+0x7b0b): undefined reference to `httplib::Client::~Client()' ``` The commit message of 88e487 was a dead giveaway: >"only find the header" A header is not enough to get the build job done. Fixes: 88e487c
1 parent de532e7 commit 7648abc

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,7 @@ else()
189189

190190
# The target httplib::httplib cannot be created manually, so rename it
191191
add_library(httplib INTERFACE ${CPP_HTTPLIB_HEADER})
192+
target_link_libraries(httplib INTERFACE -lcpp-httplib)
192193
endif()
193194
find_package(ZLIB REQUIRED)
194195
find_package(plog REQUIRED)

0 commit comments

Comments
 (0)