diff options
author | Kip Warner <kip@thevertigo.com> | 2021-07-13 10:30:45 -0700 |
---|---|---|
committer | Kip Warner <kip@thevertigo.com> | 2021-07-13 10:30:45 -0700 |
commit | 41f97cfd347b27f041deb486e1df51b0049371ce (patch) | |
tree | 086e053f5a56c6f5819c2e02b14d96ce5f97754b | |
parent | 2f10af38d2eab4e94f6d9204627e11400fe0995f (diff) | |
download | cpuinfo-41f97cfd347b27f041deb486e1df51b0049371ce.tar.gz |
README.md: Removed versioning constraint from pkg-config example...
CMakeLists.txt: Cosmetic changes...
-rw-r--r-- | CMakeLists.txt | 20 | ||||
-rw-r--r-- | README.md | 4 |
2 files changed, 13 insertions, 11 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 2c25617..845ec28 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() @@ -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" ``` |