Skip to content

Commit

Permalink
Fix linking on Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
janhenke committed May 26, 2024
1 parent 910d069 commit d66ae57
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
6 changes: 5 additions & 1 deletion mumble_protocol/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ find_package(Threads REQUIRED)

add_library(
mumble_protocol
STATIC
SHARED
src/Mumble.proto
src/MumbleUDP.proto
src/packet.cpp
Expand Down Expand Up @@ -37,8 +37,12 @@ set_target_properties(
CXX_STANDARD 23
CXX_STANDARD_REQUIRED ON
CXX_EXTENSIONS OFF
CXX_VISIBILITY_PRESET hidden
VISIBILITY_INLINES_HIDDEN ON
POSITION_INDEPENDENT_CODE ON
INTERPROCEDURAL_OPTIMIZATION ${LTO_SUPPORTED}
VERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}"
SOVERSION 0
)

target_include_directories(
Expand Down
2 changes: 1 addition & 1 deletion mumble_protocol/src/packet.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ class MUMBLE_PROTOCOL_EXPORT MumbleControlPacket {
// 0xFFFF 0xFFFF 0xFFFF 0xFFFF
// (big-endian)
//
class MumbleVersion {
class MUMBLE_PROTOCOL_EXPORT MumbleVersion {
std::uint16_t major_;
std::uint16_t minor_;
std::uint16_t patch_;
Expand Down
4 changes: 2 additions & 2 deletions server/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ set_target_properties(
)

find_package(Boost ${BOOST_REQUIRED_VERSION} REQUIRED COMPONENTS program_options)
pkg_check_modules(libpqxx REQUIRED IMPORTED_TARGET libpqxx)
find_package(libpqxx CONFIG REQUIRED)
find_package(OpenSSL CONFIG REQUIRED)
find_package(spdlog CONFIG REQUIRED)

Expand All @@ -28,7 +28,7 @@ target_link_libraries(
PRIVATE mumble_protocol
PRIVATE Boost::boost
PRIVATE Boost::program_options
PRIVATE PkgConfig::libpqxx
PRIVATE libpqxx::pqxx
PRIVATE OpenSSL::SSL
PRIVATE OpenSSL::Crypto
PRIVATE spdlog::spdlog
Expand Down

0 comments on commit d66ae57

Please sign in to comment.