From 41f97cfd347b27f041deb486e1df51b0049371ce Mon Sep 17 00:00:00 2001 From: Kip Warner Date: Tue, 13 Jul 2021 10:30:45 -0700 Subject: [PATCH] README.md: Removed versioning constraint from pkg-config example... CMakeLists.txt: Cosmetic changes... --- CMakeLists.txt | 20 +++++++++++--------- README.md | 4 ++-- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2c25617c..845ec28d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -827,7 +827,7 @@ IF(CPUINFO_SUPPORTED_PLATFORM AND CPUINFO_BUILD_TOOLS) ENDIF() # ---[ pkg-config manifest. This is mostly from JsonCpp... -if(CPUINFO_BUILD_PKG_CONFIG) +IF(CPUINFO_BUILD_PKG_CONFIG) FUNCTION(JOIN_PATHS joined_path first_path_segment) SET(temp_path "${first_path_segment}") @@ -843,14 +843,16 @@ if(CPUINFO_BUILD_PKG_CONFIG) SET(${joined_path} "${temp_path}" PARENT_SCOPE) ENDFUNCTION() -JOIN_PATHS(libdir_for_pc_file "\${exec_prefix}" "${CMAKE_INSTALL_LIBDIR}") -JOIN_PATHS(includedir_for_pc_file "\${prefix}" "${CMAKE_INSTALL_INCLUDEDIR}") + JOIN_PATHS(libdir_for_pc_file "\${exec_prefix}" "${CMAKE_INSTALL_LIBDIR}") + JOIN_PATHS(includedir_for_pc_file "\${prefix}" "${CMAKE_INSTALL_INCLUDEDIR}") -configure_file( - "libcpuinfo.pc.in" - "libcpuinfo.pc" - @ONLY) -install(FILES "${CMAKE_CURRENT_BINARY_DIR}/libcpuinfo.pc" + CONFIGURE_FILE( + "libcpuinfo.pc.in" + "libcpuinfo.pc" + @ONLY) + + INSTALL(FILES "${CMAKE_CURRENT_BINARY_DIR}/libcpuinfo.pc" DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig") -endif() + +ENDIF() diff --git a/README.md b/README.md index 0707f737..0eb71a5d 100644 --- a/README.md +++ b/README.md @@ -127,8 +127,8 @@ To [use](https://autotools.io/pkgconfig/pkg_check_modules.html) with the GNU Aut ```makefile # CPU INFOrmation library... PKG_CHECK_MODULES( - [libcpuinfo], [libcpuinfo >= 0.1], [], - [AC_MSG_ERROR([libcpuinfo >= 0.1 missing...])]) + [libcpuinfo], [libcpuinfo], [], + [AC_MSG_ERROR([libcpuinfo missing...])]) YOURPROJECT_CXXFLAGS="$YOURPROJECT_CXXFLAGS $libcpuinfo_CFLAGS" YOURPROJECT_LIBS="$YOURPROJECT_LIBS $libcpuinfo_LIBS" ```