Skip to content

Commit

Permalink
Merge pull request #360 from untereiner/pkgconfig
Browse files Browse the repository at this point in the history
pkg-config files to help find cgogn libraries in the systems
  • Loading branch information
Lionel Untereiner authored Oct 4, 2018
2 parents bd7fbaf + fc28e41 commit 3661cd0
Show file tree
Hide file tree
Showing 12 changed files with 94 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cgogn/core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,9 @@ else()
target_compile_definitions(${PROJECT_NAME} PUBLIC "CGOGN_ENDIANNESS=CGOGN_LITTLE_ENDIAN")
endif()

configure_file(${PROJECT_SOURCE_DIR}/cgogn_core.pc.in ${CMAKE_CURRENT_BINARY_DIR}/cgogn_core.pc @ONLY)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/cgogn_core.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)

install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/cgogn/core
FILES_MATCHING PATTERN "*.h"
Expand Down
12 changes: 12 additions & 0 deletions cgogn/core/cgogn_core.pc.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=${prefix}
libdir=@CMAKE_INSTALL_LIBDIR@
includedir=@CMAKE_INSTALL_INCLUDEDIR@

Name: @PROJECT_NAME@
Description: core library of the cgogn geometric modeling kernel
Version: @CGoGN_VERSION@
Requires: @PKG_CONFIG_REQUIRES@

Libs: -L${libdir} -l@PROJECT_NAME@
Cflags: -I${includedir}
4 changes: 4 additions & 0 deletions cgogn/geometry/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ target_include_directories(${PROJECT_NAME} PUBLIC

target_link_libraries(${PROJECT_NAME} cgogn::core Eigen3::Eigen)

set(PKG_CONFIG_REQUIRES "cgogn_core")
configure_file(${PROJECT_SOURCE_DIR}/cgogn_geometry.pc.in ${CMAKE_CURRENT_BINARY_DIR}/cgogn_geometry.pc @ONLY)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/cgogn_geometry.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)

install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/cgogn/geometry
FILES_MATCHING PATTERN "*.h"
Expand Down
12 changes: 12 additions & 0 deletions cgogn/geometry/cgogn_geometry.pc.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=${prefix}
libdir=@CMAKE_INSTALL_LIBDIR@
includedir=@CMAKE_INSTALL_INCLUDEDIR@

Name: @PROJECT_NAME@
Description: geometry library of the cgogn geometric modeling kernel
Version: @CGoGN_VERSION@
Requires: @PKG_CONFIG_REQUIRES@

Libs: -L${libdir} -l@PROJECT_NAME@
Cflags: -I${includedir}
4 changes: 4 additions & 0 deletions cgogn/io/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@ target_include_directories(${PROJECT_NAME} PUBLIC

target_link_libraries(${PROJECT_NAME} cgogn::core cgogn::geometry ZLIB::ZLIB ply Meshb TinyXML2::TinyXML2)

set(PKG_CONFIG_REQUIRES "cgogn_core cgogn_geometry")
configure_file(${PROJECT_SOURCE_DIR}/cgogn_io.pc.in ${CMAKE_CURRENT_BINARY_DIR}/cgogn_io.pc @ONLY)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/cgogn_io.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)

install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/cgogn/io
FILES_MATCHING PATTERN "*.h"
Expand Down
12 changes: 12 additions & 0 deletions cgogn/io/cgogn_io.pc.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=${prefix}
libdir=@CMAKE_INSTALL_LIBDIR@
includedir=@CMAKE_INSTALL_INCLUDEDIR@

Name: @PROJECT_NAME@
Description: I/O library of the cgogn geometric modeling kernel
Version: @CGoGN_VERSION@
Requires: @PKG_CONFIG_REQUIRES@

Libs: -L${libdir} -l@PROJECT_NAME@
Cflags: -I${includedir}
3 changes: 3 additions & 0 deletions cgogn/modeling/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ target_include_directories(${PROJECT_NAME} PUBLIC

target_link_libraries(${PROJECT_NAME} cgogn::core cgogn::geometry)

set(PKG_CONFIG_REQUIRES "cgogn_core cgogn_geometry")
configure_file(${PROJECT_SOURCE_DIR}/cgogn_modeling.pc.in ${CMAKE_CURRENT_BINARY_DIR}/cgogn_modeling.pc @ONLY)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/cgogn_modeling.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)

install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/cgogn/modeling
Expand Down
12 changes: 12 additions & 0 deletions cgogn/modeling/cgogn_modeling.pc.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=${prefix}
libdir=@CMAKE_INSTALL_LIBDIR@
includedir=@CMAKE_INSTALL_INCLUDEDIR@

Name: @PROJECT_NAME@
Description: modeling library of the cgogn geometric modeling kernel
Version: @CGoGN_VERSION@
Requires: @PKG_CONFIG_REQUIRES@

Libs: -L${libdir} -l@PROJECT_NAME@
Cflags: -I${includedir}
4 changes: 4 additions & 0 deletions cgogn/rendering/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,10 @@ target_include_directories(${PROJECT_NAME} PUBLIC

target_link_libraries(${PROJECT_NAME} cgogn::core cgogn::geometry Qt5::Gui QOGLViewer)

set(PKG_CONFIG_REQUIRES "cgogn_core cgogn_geometry")
configure_file(${PROJECT_SOURCE_DIR}/cgogn_rendering.pc.in ${CMAKE_CURRENT_BINARY_DIR}/cgogn_rendering.pc @ONLY)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/cgogn_rendering.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)

install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/cgogn/rendering
FILES_MATCHING PATTERN "*.h"
Expand Down
12 changes: 12 additions & 0 deletions cgogn/rendering/cgogn_rendering.pc.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=${prefix}
libdir=@CMAKE_INSTALL_LIBDIR@
includedir=@CMAKE_INSTALL_INCLUDEDIR@

Name: @PROJECT_NAME@
Description: rendering library of the cgogn geometric modeling kernel
Version: @CGoGN_VERSION@
Requires: @PKG_CONFIG_REQUIRES@

Libs: -L${libdir} -l@PROJECT_NAME@
Cflags: -I${includedir}
4 changes: 4 additions & 0 deletions cgogn/topology/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ target_include_directories(${PROJECT_NAME} PUBLIC

target_link_libraries(${PROJECT_NAME} cgogn::core cgogn::geometry)

set(PKG_CONFIG_REQUIRES "cgogn_core cgogn_geometry")
configure_file(${PROJECT_SOURCE_DIR}/cgogn_topology.pc.in ${CMAKE_CURRENT_BINARY_DIR}/cgogn_topology.pc @ONLY)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/cgogn_topology.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)

install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/cgogn/topology
FILES_MATCHING PATTERN "*.h"
Expand Down
12 changes: 12 additions & 0 deletions cgogn/topology/cgogn_topology.pc.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=${prefix}
libdir=@CMAKE_INSTALL_LIBDIR@
includedir=@CMAKE_INSTALL_INCLUDEDIR@

Name: @PROJECT_NAME@
Description: topology library of the cgogn geometric modeling kernel
Version: @CGoGN_VERSION@
Requires: @PKG_CONFIG_REQUIRES@

Libs: -L${libdir} -l@PROJECT_NAME@
Cflags: -I${includedir}

0 comments on commit 3661cd0

Please sign in to comment.