Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
populate pkg-config's "Libs.private"
Closes: #49
  • Loading branch information
umlaeute committed May 7, 2018
1 parent 3b2dc20 commit 08f243d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CMakeLists.txt
Expand Up @@ -19,6 +19,8 @@ SET(CPACK_PACKAGE_VERSION_MINOR "5")
SET(CPACK_PACKAGE_VERSION_PATCH "1")
SET(CPACK_DEBIAN_PACKAGE_DEPENDS "zlib1g")

SET(PKG_CONFIG_PRIVATELIBS "")

SET(PROJECT_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}")

CHECK_C_COMPILER_FLAG(-Wall C_HAS_WALL)
Expand Down
2 changes: 1 addition & 1 deletion libmysofa.pc.cmake
Expand Up @@ -8,5 +8,5 @@ libdir=${prefix}/lib
Libs: -L${libdir} -lmysofa
Cflags: -I${includedir}

#Libs.private:
Libs.private: @PKG_CONFIG_PRIVATELIBS@
#Requires.private:
5 changes: 5 additions & 0 deletions src/CMakeLists.txt
Expand Up @@ -31,6 +31,9 @@ endif()
if(NOT MSVC)
find_library(MATH m)
include(FindZLIB)

SET(PKG_CONFIG_PRIVATELIBS "-lm ${PKG_CONFIG_PRIVATELIBS}")
SET(PKG_CONFIG_PRIVATELIBS "-lz ${PKG_CONFIG_PRIVATELIBS}")
else()
set(MATH "")
find_program(NUGET nuget)
Expand Down Expand Up @@ -89,3 +92,5 @@ if(BUILD_TESTS)
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif(BUILD_TESTS)

SET(PKG_CONFIG_PRIVATELIBS "${PKG_CONFIG_PRIVATELIBS}" PARENT_SCOPE)

0 comments on commit 08f243d

Please sign in to comment.