diff options
author | dimitri staessens <dimitri.staessens@ugent.be> | 2017-08-18 15:56:55 +0200 |
---|---|---|
committer | dimitri staessens <dimitri.staessens@ugent.be> | 2017-08-21 10:25:19 +0200 |
commit | 8f58e5a3ec0e4a15fc8ae0911cc864f5dbf86c6e (patch) | |
tree | 0535742162921dc0d19c16f5b02d2f1c8f4fc493 /CMakeLists.txt | |
parent | eefae235dd7af96eef3dc4f82f706170c379d260 (diff) | |
download | ouroboros-8f58e5a3ec0e4a15fc8ae0911cc864f5dbf86c6e.tar.gz ouroboros-8f58e5a3ec0e4a15fc8ae0911cc864f5dbf86c6e.zip |
build: Revise the build system
This revises the build system to have configuration per system
component. System settings can now be set using cmake.
The standard compliance defines were removed from configuration header
and are set in the sources where needed. Also some small code
refactors, such as moving the data for shims out of the ipcp structure
to the respective shims were performed.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 32 |
1 files changed, 11 insertions, 21 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index ba56dc33..d4060d5f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,14 +10,10 @@ git_version_gen() include(GNUInstallDirs) set(PACKAGE_NAME "${CMAKE_PROJECT_NAME}") -set(PACKAGE_DESCRIPTION "The Ouroboros prototype" - CACHE STRING "Package description") -set(PACKAGE_URL "None" - CACHE STRING "Package URL") -set(PACKAGE_BUGREPORT "None" - CACHE STRING "Packaged bug-report email") -set(PACKAGE_VERSION "${PACKAGE_VERSION_MAJOR}.${PACKAGE_VERSION_MINOR}" - CACHE STRING "Package version") +set(PACKAGE_DESCRIPTION "The Ouroboros prototype") +set(PACKAGE_URL "None") +set(PACKAGE_BUGREPORT "None") +set(PACKAGE_VERSION "${PACKAGE_VERSION_MAJOR}.${PACKAGE_VERSION_MINOR}") if (APPLE) set(CMAKE_MACOSX_RPATH 1) @@ -72,15 +68,11 @@ 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.pc.in" + "${CMAKE_CURRENT_BINARY_DIR}/ouroboros.pc" @ONLY) -if (NOT APPLE) - install(FILES "${CMAKE_CURRENT_BINARY_DIR}/ouroboros.pc" - DESTINATION "/usr/lib/pkgconfig") -endif () +install(FILES "${CMAKE_CURRENT_BINARY_DIR}/ouroboros.pc" + DESTINATION "usr/lib/pkgconfig") enable_testing() add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND}) @@ -88,15 +80,13 @@ add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND}) find_package(ProtobufC REQUIRED) include_directories(${PROTOBUF_C_INCLUDE_DIRS}) -add_subdirectory(src) add_subdirectory(include) +add_subdirectory(src) add_subdirectory(doc) # Uninstall target -configure_file( - "${CMAKE_SOURCE_DIR}/cmake/CmakeUninstall.cmake.in" - "${CMAKE_BINARY_DIR}/cmake/CmakeUninstall.cmake" - IMMEDIATE @ONLY) +configure_file("${CMAKE_SOURCE_DIR}/cmake/CmakeUninstall.cmake.in" + "${CMAKE_BINARY_DIR}/cmake/CmakeUninstall.cmake" IMMEDIATE @ONLY) add_custom_target(uninstall COMMAND ${CMAKE_COMMAND} -P ${CMAKE_BINARY_DIR}/cmake/CmakeUninstall.cmake) |