File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -375,11 +375,31 @@ if (MSVC)
375375 endif ()
376376else ()
377377 if (WITH_OPENPGM)
378- message (FATAL_ERROR "WITH_OPENPGM not implemented" )
378+ # message (FATAL_ERROR "WITH_OPENPGM not implemented")
379+
380+ if (NOT OPENPGM_PKGCONFIG_NAME)
381+ SET (OPENPGM_PKGCONFIG_NAME "openpgm-5.2" )
382+ endif (NOT OPENPGM_PKGCONFIG_NAME )
383+
384+ SET (OPENPGM_PKGCONFIG_NAME ${OPENPGM_PKGCONFIG_NAME} CACHE STRING
385+ "Name pkg-config shall use to find openpgm libraries and include paths"
386+ FORCE )
387+
388+ find_package (PkgConfig )
389+ pkg_check_modules (OPENPGM ${OPENPGM_PKGCONFIG_NAME} )
390+
391+ if (OPENPGM_FOUND)
392+ message (STATUS ${OPENPGM_PKGCONFIG_NAME} " found" )
393+ else ()
394+ message (FATAL_ERROR
395+ ${OPENPGM_PKGCONFIG_NAME} " not found. openpgm is searchd via `pkg-config ${OPENPGM_PKGCONFIG_NAME} `. Consider providing a valid OPENPGM_PKGCONFIG_NAME" )
396+ endif ()
397+
379398 # DSO symbol visibility for openpgm
380399 if (HAVE_FLAG_VISIBILITY_HIDDEN)
381400
382401 elseif (HAVE_FLAG_LDSCOPE_HIDDEN)
402+
383403 endif ()
384404 endif ()
385405endif ()
@@ -780,7 +800,7 @@ endif ()
780800if (WITH_PERF_TOOL)
781801 foreach (perf-tool ${perf-tools})
782802 add_executable (${perf-tool} perf/${perf-tool}.cpp )
783- target_link_libraries (${perf-tool} libzmq )
803+ target_link_libraries (${perf-tool} libzmq ${OPTIONAL_LIBRARIES} )
784804
785805 if (RT_LIBRARY)
786806 target_link_libraries (${perf-tool} ${RT_LIBRARY} )
Original file line number Diff line number Diff line change @@ -138,7 +138,7 @@ if(WIN32)
138138endif ()
139139
140140# add library and include dirs for all targets
141- link_libraries (libzmq )
141+ link_libraries (libzmq ${OPTIONAL_LIBRARIES} )
142142include_directories ("${CMAKE_SOURCE_DIR} /../include" )
143143
144144foreach (test ${tests} )
@@ -157,6 +157,7 @@ foreach(test ${tests})
157157 endif ()
158158 endif ()
159159
160+
160161 if (RT_LIBRARY)
161162 target_link_libraries (${test} ${RT_LIBRARY} )
162163 endif ()
You can’t perform that action at this time.
0 commit comments