diff options
author | Sam Bingner <sam@bingner.com> | 2019-12-26 14:38:09 -1000 |
---|---|---|
committer | Sam Bingner <sam@bingner.com> | 2019-12-26 15:12:15 -1000 |
commit | bdaae0cf10410d534d381ab7fced7fa02ff3f695 (patch) | |
tree | 4036b4ed994a2545fc5d995a3742c618a4d81a39 | |
parent | dce63b96e54533cb35d6618d200701363d5b6e44 (diff) |
Revert "Build system changes"
This reverts commit f84454a0628916d0590e43f1057a422673a11c97.
-rw-r--r-- | CMake/Documentation.cmake | 4 | ||||
-rw-r--r-- | CMake/Misc.cmake | 20 | ||||
-rw-r--r-- | CMakeLists.txt | 14 | ||||
-rw-r--r-- | apt-pkg/CMakeLists.txt | 2 |
4 files changed, 15 insertions, 25 deletions
diff --git a/CMake/Documentation.cmake b/CMake/Documentation.cmake index 06926154c..d8a2d2c9d 100644 --- a/CMake/Documentation.cmake +++ b/CMake/Documentation.cmake @@ -34,8 +34,6 @@ find_path(DOCBOOK_XSL manpages/docbook.xsl /usr/share/xml/docbook/xsl-stylesheets # Fedora /usr/share/sgml/docbook/xsl-stylesheets - #Brew - /usr/local/Cellar/docbook-xsl/1.79.1/docbook-xsl/ # Fink ${CMAKE_INSTALL_PREFIX}/share/xml/xsl/docbook-xsl # FreeBSD @@ -281,7 +279,7 @@ function(add_docbook target) foreach(document ${DOC_DOCUMENTS}) foreach(lang ${DOC_LINGUAS}) - po4a_one(po4a_stamp po4a_out ${document} "${lang}" "${DOC_DEPENDS}") + po4a_one(po4a_stamp po4a_out ${document} "${lang}" "${DOC_DEPENDS}") xsltproc_one(STAMP_OUT xslt_stamp STAMP ${po4a_stamp} FULL_DOCUMENT ${po4a_out} diff --git a/CMake/Misc.cmake b/CMake/Misc.cmake index 72bd61f14..6ad0b9479 100644 --- a/CMake/Misc.cmake +++ b/CMake/Misc.cmake @@ -66,16 +66,16 @@ endfunction() # Generates a simple version script versioning everything with current SOVERSION function(add_version_script target) - #get_target_property(soversion ${target} SOVERSION) - #set(script "${CMAKE_CURRENT_BINARY_DIR}/${target}.versionscript") - #string(REPLACE "-" "" name "${target}_${soversion}") - #string(TOUPPER "${name}" name) - #add_custom_command(OUTPUT "${script}" - # COMMAND echo "${name} {global: *; };" > "${script}" - # VERBATIM ) - #add_custom_target(${target}-versionscript DEPENDS "${script}") - #target_link_libraries(${target} PRIVATE -Wl,-version-script="${script}") - #add_dependencies(${target} ${target}-versionscript) + get_target_property(soversion ${target} SOVERSION) + set(script "${CMAKE_CURRENT_BINARY_DIR}/${target}.versionscript") + string(REPLACE "-" "" name "${target}_${soversion}") + string(TOUPPER "${name}" name) + add_custom_command(OUTPUT "${script}" + COMMAND echo "${name} {global: *; };" > "${script}" + VERBATIM ) + add_custom_target(${target}-versionscript DEPENDS "${script}") + target_link_libraries(${target} PRIVATE -Wl,-version-script="${script}") + add_dependencies(${target} ${target}-versionscript) endfunction() function(path_join out path1 path2) diff --git a/CMakeLists.txt b/CMakeLists.txt index 11a30679e..beb259a6b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,18 +10,15 @@ include_directories(${PROJECT_BINARY_DIR}/include) enable_testing() -option(WITH_DOC "Build documentation." ON) +option(WITH_DOC "Build documentation." OFF) option(USE_NLS "Localisation support." ON) -INCLUDE_DIRECTORIES(/usr/src/skel/usr/include) -LINK_DIRECTORIES(/usr/src/skel/usr/lib) - set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/CMake") # Add coverage target set(CMAKE_CXX_FLAGS_COVERAGE "-g -fprofile-arcs -ftest-coverage") -set(CMAKE_EXE_LINKER_FLAGS_COVERAGE "-lgcov -lSystem") -set(CMAKE_SHARED_LINKER_FLAGS_COVERAGE "-lgcov -lSystem") +set(CMAKE_EXE_LINKER_FLAGS_COVERAGE "-lgcov") +set(CMAKE_SHARED_LINKER_FLAGS_COVERAGE "-lgcov") # Work around bug in GNUInstallDirs if (EXISTS "/etc/debian_version") @@ -225,11 +222,6 @@ add_subdirectory(apt-private) add_subdirectory(apt-inst) add_subdirectory(cmdline) add_subdirectory(completions) - -if (WITH_DOC) -add_subdirectory(doc) -endif() - add_subdirectory(dselect) add_subdirectory(ftparchive) add_subdirectory(methods) diff --git a/apt-pkg/CMakeLists.txt b/apt-pkg/CMakeLists.txt index b0f495a19..e01261c05 100644 --- a/apt-pkg/CMakeLists.txt +++ b/apt-pkg/CMakeLists.txt @@ -37,7 +37,7 @@ file(GLOB_RECURSE headers "*.h") # Create a library using the C++ files add_library(apt-pkg SHARED ${library}) -#add_dependencies(apt-pkg apt-pkg-versionscript) +add_dependencies(apt-pkg apt-pkg-versionscript) # Link the library and set the SONAME target_include_directories(apt-pkg PRIVATE ${ZLIB_INCLUDE_DIRS} |