Commit 77944cd1 authored by Andreas Schneider's avatar Andreas Schneider

cmake: Add --libs output for pkg-config.

parent 23631b4c
......@@ -47,7 +47,18 @@ find_package(Threads)
include(ConfigureChecks.cmake)
configure_file(config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h)
# check subdirectories
add_subdirectory(src)
if (UNIT_TESTING)
find_package(CMocka REQUIRED)
include(AddCMockaTest)
add_subdirectory(tests)
endif (UNIT_TESTING)
# pkg-config file
get_filename_component(SOCKET_WRAPPER_LIB ${SOCKET_WRAPPER_LOCATION} NAME)
configure_file(socket_wrapper.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/socket_wrapper.pc @ONLY)
install(
FILES
......@@ -69,11 +80,3 @@ install(
devel
)
# check subdirectories
add_subdirectory(src)
if (UNIT_TESTING)
find_package(CMocka REQUIRED)
include(AddCMockaTest)
add_subdirectory(tests)
endif (UNIT_TESTING)
Name: @APPLICATION_NAME@
Description: The socket_wrapper library
Version: @APPLICATION_VERSION@
Libs: @LIB_INSTALL_DIR@/@SOCKET_WRAPPER_LIB@
......@@ -21,3 +21,7 @@ set_target_properties(
SOVERSION
${LIBRARY_SOVERSION}
)
# This needs to be at the end
get_target_property(SWRAP_LOCATION socket_wrapper LOCATION)
set(SOCKET_WRAPPER_LOCATION ${SWRAP_LOCATION} PARENT_SCOPE)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment