Commit 14a94999 by Maarten L. Hekkelman

fix cmake files, pkg-config file

parent 0fafb80d
......@@ -174,9 +174,7 @@ set(Boost_DETAILED_FAILURE_MSG ON)
set(Boost_USE_STATIC_LIBS ON)
find_package(Boost 1.70.0 REQUIRED COMPONENTS system iostreams regex date_time program_options)
find_package(ZLIB REQUIRED)
include_directories(${Boost_INCLUDE_DIR})
find_package(ZLIB REQUIRED COMPONENTS zlibstatic)
# Create a revision file, containing the current git version info
......@@ -205,6 +203,7 @@ if(RECREATE_SYMOP_DATA)
add_executable(symop-map-generator "${CMAKE_SOURCE_DIR}/tools/symop-map-generator.cpp")
target_link_libraries(symop-map-generator Threads::Threads ${Boost_LIBRARIES} std::filesystem ZLIB::ZLIB)
target_include_directories(symop-map-generator ${Boost_INCLUDE_DIR})
set($ENV{CLIBD} ${CLIBD})
......@@ -265,6 +264,8 @@ target_include_directories(cifpp
PUBLIC
"$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>"
"$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>"
${Boost_INCLUDE_DIR}
${ZLIB_INCLUDE_DIR}
)
target_link_libraries(cifpp Threads::Threads ${Boost_LIBRARIES} std::filesystem ZLIB::ZLIB)
......@@ -388,6 +389,16 @@ set(exec_prefix ${CMAKE_INSTALL_PREFIX})
set(libdir ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR})
set(includedir ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR})
get_target_property(PRIVATE_LIBRARIES cifpp INTERFACE_LINK_LIBRARIES)
foreach(LIB ${PRIVATE_LIBRARIES})
set(PRIVATE_LIBS "${PRIVATE_LIBS} -l${LIB}")
endforeach()
get_target_property(PRIVATE_INCLUDE_DIRS cifpp INTERFACE_INCLUDE_DIRECTORIES)
foreach(INC ${PRIVATE_INCLUDE_DIRS})
set(PRIVATE_INC_DIRS "${PRIVATE_INC_DIRS} -I ${INC}")
endforeach()
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libcifpp.pc.in
${CMAKE_CURRENT_BINARY_DIR}/libcifpp.pc.in @ONLY)
file(GENERATE OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/libcifpp.pc
......
......@@ -8,5 +8,5 @@ Name: libcifpp
Description: C++ library for the manipulation of mmCIF files.
Version: @PACKAGE_VERSION@
Libs: -L${libdir} -lcifpp
Cflags: -I${includedir}
Libs: -L${libdir} -lcifpp @PRIVATE_LIBS@
Cflags: -I${includedir} @PRIVATE_INC_DIRS@
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