From bedd1d4eadde9ab64f924c69eba716b015599e67 Mon Sep 17 00:00:00 2001 From: dimitri staessens Date: Thu, 12 Oct 2017 02:15:39 +0200 Subject: lib: Deprecate ouroboros_init and ourboros_fini This commit deprecates ouroboros_init and ouroboros_fini and adds them as a constructor or destructor, causing these function to be run automatically when a program that links to the library calls and exits main(). For this to fully work, the library had to be split so that we can avoid the irmd calling these functions (the IRMd has to create the shm structures on which these calls depend). The library is split in 3 parts: libouroboros-dev, libouroboros-irm and libouroboros-common. The latter is linked to the other two so that including libouroboros-dev or libouroboros-irm will also link libouroboros-common. --- CMakeLists.txt | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 624950bc..432f6f49 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,7 +11,7 @@ include(GNUInstallDirs) set(PACKAGE_NAME "${CMAKE_PROJECT_NAME}") set(PACKAGE_DESCRIPTION "The Ouroboros prototype") -set(PACKAGE_URL "None") +set(PACKAGE_URL "http://ouroboros.ilabt.imec.be") set(PACKAGE_BUGREPORT "None") set(PACKAGE_VERSION "${PACKAGE_VERSION_MAJOR}.${PACKAGE_VERSION_MINOR}") @@ -68,10 +68,16 @@ test_and_set_c_compiler_flag_global(-Wunreachable-code) test_and_set_c_compiler_flag_global(-Wdeclaration-after-statement) test_and_set_c_compiler_flag_global(-fmax-errors=5) -configure_file("${CMAKE_CURRENT_SOURCE_DIR}/ouroboros.pc.in" - "${CMAKE_CURRENT_BINARY_DIR}/ouroboros.pc" @ONLY) +configure_file("${CMAKE_CURRENT_SOURCE_DIR}/ouroboros-dev.pc.in" + "${CMAKE_CURRENT_BINARY_DIR}/ouroboros-dev.pc" @ONLY) -install(FILES "${CMAKE_CURRENT_BINARY_DIR}/ouroboros.pc" +configure_file("${CMAKE_CURRENT_SOURCE_DIR}/ouroboros-irm.pc.in" + "${CMAKE_CURRENT_BINARY_DIR}/ouroboros-irm.pc" @ONLY) + +install(FILES "${CMAKE_CURRENT_BINARY_DIR}/ouroboros-dev.pc" + DESTINATION "usr/lib/pkgconfig") + +install(FILES "${CMAKE_CURRENT_BINARY_DIR}/ouroboros-irm.pc" DESTINATION "usr/lib/pkgconfig") if (IS_DIRECTORY "/usr/lib/systemd") -- cgit v1.2.3