Skip to content

Commit

Permalink
fixes from building on Ubuntu
Browse files Browse the repository at this point in the history
  • Loading branch information
jholloc committed Dec 3, 2023
1 parent 4d98c97 commit fb553a7
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 16 deletions.
3 changes: 2 additions & 1 deletion cmake/plugins.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@ macro( uda_plugin )

filter_lib_list( "${PLUGIN_EXTRA_LINK_LIBS}" FILTERED_LINK_LIBS debug optimized )
set( LIBRARIES ${LIBRARIES} ${FILTERED_LINK_LIBS} )


message( WARNING ">>>> ${PLUGIN_LIBNAME} ${LIBRARIES}" )
target_link_libraries( ${PLUGIN_LIBNAME} PRIVATE ${LIBRARIES} )

install(
Expand Down
3 changes: 2 additions & 1 deletion source/authentication/udaClientSSL.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@
#define VERIFY_DEPTH 4
#define X509STRINGSIZE 256

#include <export.h>

#include <client/udaClientHostList.h>
#include <clientserver/export.h>
#include <clientserver/socketStructs.h>

bool getUdaClientSSLDisabled();
Expand Down
2 changes: 1 addition & 1 deletion source/authentication/udaServerSSL.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
// Server host addressed beginng with SSL:// are assumed to be using SSL authentication. The SSL:// prefix is removed to
// make the connection.

#include <clientserver/export.h>
#include <export.h>

#ifdef __cplusplus
extern "C" {
Expand Down
17 changes: 14 additions & 3 deletions source/c_api/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,17 @@
find_package( fmt REQUIRED )
#find_package( LibXml2 REQUIRED )

set( LIBS fmt::fmt )

if( WIN32 OR MINGW )

else()
find_package( TIRPC QUIET )
if( TIRPC_FOUND )
list( APPEND LIBS TIRPC::TIRPC )
endif()
endif()

########################################################################################################################
# Sources

Expand All @@ -19,8 +30,8 @@ set( SRC_FILES
add_library( c_api-objects OBJECT ${SRC_FILES} )
add_library( fatc_api-objects OBJECT ${SRC_FILES} )

target_link_libraries( c_api-objects PUBLIC fmt::fmt )
target_link_libraries( fatc_api-objects PUBLIC fmt::fmt )
target_link_libraries( c_api-objects PUBLIC ${LIBS} )
target_link_libraries( fatc_api-objects PUBLIC ${LIBS} )

target_compile_definitions( fatc_api-objects PUBLIC -DFATCLIENT )

Expand All @@ -33,4 +44,4 @@ target_include_directories(
fatc_api-objects PRIVATE
${CMAKE_SOURCE_DIR}/source
${CMAKE_SOURCE_DIR}/source/include
)
)
1 change: 1 addition & 0 deletions source/plugins/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ target_include_directories( plugins-objects PRIVATE
${CMAKE_SOURCE_DIR}/source
${CMAKE_SOURCE_DIR}/source/include
)
target_link_libraries( plugins-objects PRIVATE ${LIBS} )

add_library( plugins-static STATIC $<TARGET_OBJECTS:plugins-objects> )
if( BUILD_SHARED_LIBS )
Expand Down
14 changes: 5 additions & 9 deletions source/plugins/uda/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,15 @@ if( NOT LIBXML2_FOUND )
return()
endif()

set( LIBS LibXml2::LibXml2 fmt::fmt )

if( WIN32 OR MINGW )
find_package( XDR REQUIRED )
include_directories( ${XDR_INCLUDE_DIR} )
list( APPEND LIBS XDR::XDR )
else()
find_package( TIRPC QUIET )
if( TIRPC_FOUND )
add_definitions( -D__TIRPC__ )
include_directories( ${TIRPC_INCLUDE_DIR} )
list( APPEND LIBS TIRPC::TIRPC )
endif()
endif()

Expand All @@ -29,11 +30,6 @@ uda_plugin(
EXAMPLE "UDA::get(host=idam0, port=56565, signal=ip, source=12345)"
LIBNAME uda_plugin
SOURCES uda_plugin.cpp
EXTRA_INCLUDE_DIRS
${LIBXML2_INCLUDE_DIR}
${CMAKE_SOURCE_DIR}/client
EXTRA_LINK_LIBS
${LIBXML2_LIBRARIES}
${OPENSSL_LIBRARIES}
fmt::fmt
${LIBS}
)
4 changes: 3 additions & 1 deletion source/structures/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ if( WIN32 OR MINGW )
list( APPEND LIBS XDR::XDR )
else()
find_package( TIRPC QUIET )
list( APPEND TIRPC::TIRPC )
list( APPEND LIBS TIRPC::TIRPC )
endif()

########################################################################################################################
Expand All @@ -31,6 +31,7 @@ target_include_directories( structures-client-objects PRIVATE
${CMAKE_SOURCE_DIR}/source
${CMAKE_SOURCE_DIR}/source/include
)
target_link_libraries( structures-client-objects PRIVATE ${LIBS} )

if( NOT CLIENT_ONLY )
add_library( structures-server-objects OBJECT ${SRC_FILES} )
Expand All @@ -39,4 +40,5 @@ if( NOT CLIENT_ONLY )
${CMAKE_SOURCE_DIR}/source
${CMAKE_SOURCE_DIR}/source/include
)
target_link_libraries( structures-server-objects PRIVATE ${LIBS} )
endif()
2 changes: 2 additions & 0 deletions source/wrappers/c++/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ target_include_directories( cpp-objects PRIVATE
${CMAKE_SOURCE_DIR}/source
${CMAKE_SOURCE_DIR}/source/include
)
target_link_libraries( cpp-objects PRIVATE ${LIBS} )

set( CLIENT_OBJS
$<TARGET_OBJECTS:client-objects>
Expand All @@ -83,6 +84,7 @@ if( NOT CLIENT_ONLY )
${CMAKE_SOURCE_DIR}/source
${CMAKE_SOURCE_DIR}/source/include
)
target_link_libraries( fatcpp-objects PRIVATE ${LIBS} )

set( FATCLIENT_OBJS
$<TARGET_OBJECTS:fatclient-objects>
Expand Down

0 comments on commit fb553a7

Please sign in to comment.