Skip to content

Commit

Permalink
Trying to fix libfmt linking errors
Browse files Browse the repository at this point in the history
  • Loading branch information
jholloc committed Jul 27, 2023
1 parent a20bee3 commit 85087e5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
14 changes: 7 additions & 7 deletions source/client/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,13 @@ include_directories(
)

add_library( client-objects OBJECT ${SRC_FILES} ${HEADER_FILES} )
target_link_libraries( client-objects PRIVATE fmt::fmt )
target_link_libraries( client-objects PUBLIC fmt::fmt )

if( NOT CLIENT_ONLY )
add_library( fatclient-objects OBJECT ${SRC_FILES} )
target_link_libraries( fatclient-objects PRIVATE fmt::fmt )
target_link_libraries( fatclient-objects PUBLIC fmt::fmt )

target_compile_definitions( fatclient-objects PRIVATE -DFATCLIENT )
target_compile_definitions( fatclient-objects PUBLIC -DFATCLIENT )
endif()

set( CLIENT_OBJS
Expand Down Expand Up @@ -127,18 +127,18 @@ elseif( TIRPC_FOUND )
set( CLIENT_LINK_LIBS ${CLIENT_LINK_LIBS} ${TIRPC_LIBRARIES} )
endif()

target_link_libraries( client-static PRIVATE ${CLIENT_LINK_LIBS} )
target_link_libraries( client-static PUBLIC ${CLIENT_LINK_LIBS} )
if( BUILD_SHARED_LIBS )
target_link_libraries( client-shared PRIVATE ${CLIENT_LINK_LIBS} )
target_link_libraries( client-shared PUBLIC ${CLIENT_LINK_LIBS} )
endif()

if( NOT CLIENT_ONLY )
add_library( fatclient-static STATIC ${FATCLIENT_OBJS} )
target_link_libraries( fatclient-static PRIVATE plugins-static ${CLIENT_LINK_LIBS} )
target_link_libraries( fatclient-static PUBLIC plugins-static ${CLIENT_LINK_LIBS} )

if( BUILD_SHARED_LIBS )
add_library( fatclient-shared SHARED ${FATCLIENT_OBJS} )
target_link_libraries( fatclient-shared PRIVATE plugins-shared ${CLIENT_LINK_LIBS} )
target_link_libraries( fatclient-shared PUBLIC plugins-shared ${CLIENT_LINK_LIBS} )
endif()
endif()

Expand Down
6 changes: 3 additions & 3 deletions source/clientserver/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -115,16 +115,16 @@ elseif( TIRPC_FOUND )
endif()

add_library( clientserver-client-objects OBJECT ${SRC_FILES} ${HEADER_FILES} )
target_link_libraries( clientserver-client-objects PRIVATE fmt::fmt )
target_link_libraries( clientserver-client-objects PUBLIC fmt::fmt )

if( NOT CLIENT_ONLY )
add_library( clientserver-server-objects OBJECT ${SRC_FILES} )
target_compile_definitions( clientserver-server-objects PUBLIC -DSERVERBUILD )
target_link_libraries( clientserver-server-objects PRIVATE fmt::fmt )
target_link_libraries( clientserver-server-objects PUBLIC fmt::fmt )

add_library( fatclientserver-objects OBJECT ${SRC_FILES} )
target_compile_definitions( fatclientserver-objects PUBLIC -DFATCLIENT )
target_link_libraries( fatclientserver-objects PRIVATE fmt::fmt )
target_link_libraries( fatclientserver-objects PUBLIC fmt::fmt )
endif()

file( GLOB HEADER_FILES "*.h" )
Expand Down

0 comments on commit 85087e5

Please sign in to comment.