The branch, master has been updated
       via  ea4387a cmake: Add cmake version file.
       via  33608ec cmake: Add a pkg-config file.
      from  3ded8a3 Update README.

http://gitweb.samba.org/?p=uid_wrapper.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit ea4387af7c66e2c0a667afd5f775e1f23e34e59e
Author: Andreas Schneider <a...@samba.org>
Date:   Mon Jan 20 12:43:21 2014 +0100

    cmake: Add cmake version file.

commit 33608ec26a836ee21b41acbacf4f65d5cb07e6f9
Author: Andreas Schneider <a...@samba.org>
Date:   Mon Jan 20 12:43:08 2014 +0100

    cmake: Add a pkg-config file.

-----------------------------------------------------------------------

Summary of changes:
 CMakeLists.txt                              |   22 ++++++++++++++++++++
 cmake/Modules/DefineInstallationPaths.cmake |   29 +++++++++++++++-----------
 uid_wrapper-config-version.cmake.in         |   11 ++++++++++
 uid_wrapper.pc.cmake                        |    3 ++
 4 files changed, 53 insertions(+), 12 deletions(-)
 create mode 100644 uid_wrapper-config-version.cmake.in
 create mode 100644 uid_wrapper.pc.cmake


Changeset truncated at 500 lines:

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2be515a..b806e62 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -47,6 +47,28 @@ find_package(Threads)
 include(ConfigureChecks.cmake)
 configure_file(config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h)
 
+# pkg-config file
+configure_file(uid_wrapper.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/uid_wrapper.pc 
@ONLY)
+install(
+  FILES
+    ${CMAKE_CURRENT_BINARY_DIR}/uid_wrapper.pc
+  DESTINATION
+    ${LIB_INSTALL_DIR}/pkgconfig
+  COMPONENT
+    pkgconfig
+)
+
+# cmake config files
+configure_file(uid_wrapper-config-version.cmake.in 
${CMAKE_CURRENT_BINARY_DIR}/uid_wrapper-config-version.cmake @ONLY)
+install(
+    FILES
+        ${CMAKE_CURRENT_BINARY_DIR}/uid_wrapper-config-version.cmake
+    DESTINATION
+        ${CMAKE_INSTALL_DIR}
+    COMPONENT
+        devel
+)
+
 # check subdirectories
 add_subdirectory(src)
 
diff --git a/cmake/Modules/DefineInstallationPaths.cmake 
b/cmake/Modules/DefineInstallationPaths.cmake
index d857871..88e08ca 100644
--- a/cmake/Modules/DefineInstallationPaths.cmake
+++ b/cmake/Modules/DefineInstallationPaths.cmake
@@ -1,15 +1,4 @@
-if (WIN32)
-  # Same same
-  set(BIN_INSTALL_DIR "bin" CACHE PATH "-")
-  set(SBIN_INSTALL_DIR "." CACHE PATH "-")
-  set(LIB_INSTALL_DIR "lib" CACHE PATH "-")
-  set(INCLUDE_INSTALL_DIR "include" CACHE PATH "-")
-  set(PLUGIN_INSTALL_DIR "plugins" CACHE PATH "-")
-  set(HTML_INSTALL_DIR "doc/HTML" CACHE PATH "-")
-  set(ICON_INSTALL_DIR "." CACHE PATH "-")
-  set(SOUND_INSTALL_DIR "." CACHE PATH "-")
-  set(LOCALE_INSTALL_DIR "lang" CACHE PATH "-")
-elseif (UNIX OR OS2)
+if (UNIX OR OS2)
   IF (NOT APPLICATION_NAME)
     MESSAGE(STATUS "${PROJECT_NAME} is used as APPLICATION_NAME")
     SET(APPLICATION_NAME ${PROJECT_NAME})
@@ -58,6 +47,10 @@ elseif (UNIX OR OS2)
     CACHE PATH "The subdirectory to the header prefix (default prefix/include)"
   )
 
+  set(CMAKE_INSTALL_DIR
+    "${LIB_INSTALL_DIR}/cmake"
+    CACHE PATH "The subdirectory to install cmake config files")
+
   SET(DATA_INSTALL_DIR
     "${DATA_INSTALL_PREFIX}"
     CACHE PATH "The parent directory where applications can install their data 
(default prefix/share/${APPLICATION_NAME})"
@@ -101,4 +94,16 @@ elseif (UNIX OR OS2)
     "${SHARE_INSTALL_PREFIX}/info"
     CACHE PATH "The ${APPLICATION_NAME} info install dir (default prefix/info)"
   )
+else()
+  # Same same
+  set(BIN_INSTALL_DIR "bin" CACHE PATH "-")
+  set(SBIN_INSTALL_DIR "sbin" CACHE PATH "-")
+  set(LIB_INSTALL_DIR "lib${LIB_SUFFIX}" CACHE PATH "-")
+  set(INCLUDE_INSTALL_DIR "include" CACHE PATH "-")
+  set(CMAKE_INSTALL_DIR "CMake" CACHE PATH "-")
+  set(PLUGIN_INSTALL_DIR "plugins" CACHE PATH "-")
+  set(HTML_INSTALL_DIR "doc/HTML" CACHE PATH "-")
+  set(ICON_INSTALL_DIR "icons" CACHE PATH "-")
+  set(SOUND_INSTALL_DIR "soudns" CACHE PATH "-")
+  set(LOCALE_INSTALL_DIR "lang" CACHE PATH "-")
 endif ()
diff --git a/uid_wrapper-config-version.cmake.in 
b/uid_wrapper-config-version.cmake.in
new file mode 100644
index 0000000..98f292c
--- /dev/null
+++ b/uid_wrapper-config-version.cmake.in
@@ -0,0 +1,11 @@
+set(PACKAGE_VERSION @APPLICATION_VERSION@)
+
+# Check whether the requested PACKAGE_FIND_VERSION is compatible
+if("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}")
+    set(PACKAGE_VERSION_COMPATIBLE FALSE)
+else()
+    set(PACKAGE_VERSION_COMPATIBLE TRUE)
+    if ("${PACKAGE_VERSION}" VERSION_EQUAL "${PACKAGE_FIND_VERSION}")
+        set(PACKAGE_VERSION_EXACT TRUE)
+    endif()
+endif()
diff --git a/uid_wrapper.pc.cmake b/uid_wrapper.pc.cmake
new file mode 100644
index 0000000..688e104
--- /dev/null
+++ b/uid_wrapper.pc.cmake
@@ -0,0 +1,3 @@
+Name: @APPLICATION_NAME@
+Description: The uid_wrapper library
+Version: @APPLICATION_VERSION@


-- 
UID Wrapper Repository

Reply via email to