This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
       via  6fe28452898c3fea0bf021cacfe0885686e517dd (commit)
       via  67cb50abd77dddc3cc74597efe38285f9bc9e4cf (commit)
       via  e18e21aeb52923d470680aa171f722b4d3b5d01d (commit)
      from  3bce2ae4240a701c7e05cd05514d0ae9443ce778 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6fe28452898c3fea0bf021cacfe0885686e517dd
commit 6fe28452898c3fea0bf021cacfe0885686e517dd
Merge: 3bce2ae 67cb50a
Author:     Stephen Kelly <steve...@gmail.com>
AuthorDate: Thu Dec 4 18:12:38 2014 -0500
Commit:     CMake Topic Stage <kwro...@kitware.com>
CommitDate: Thu Dec 4 18:12:38 2014 -0500

    Merge topic 'Find-Modules-documentation' into next
    
    67cb50ab Help: Document that IMPORTED targets in Find modules may be 
UNKNOWN.
    e18e21ae Help: Document IMPORTED_CONFIGURATIONS target property for Find 
modules.


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=67cb50abd77dddc3cc74597efe38285f9bc9e4cf
commit 67cb50abd77dddc3cc74597efe38285f9bc9e4cf
Author:     Stephen Kelly <steve...@gmail.com>
AuthorDate: Thu Dec 4 23:56:52 2014 +0100
Commit:     Stephen Kelly <steve...@gmail.com>
CommitDate: Fri Dec 5 00:12:14 2014 +0100

    Help: Document that IMPORTED targets in Find modules may be UNKNOWN.

diff --git a/Help/manual/cmake-developer.7.rst 
b/Help/manual/cmake-developer.7.rst
index 6f7bbdc..3b9b921 100644
--- a/Help/manual/cmake-developer.7.rst
+++ b/Help/manual/cmake-developer.7.rst
@@ -1052,6 +1052,11 @@ not any of its dependencies.  Instead, those 
dependencies should also be
 targets, and CMake should be told that they are dependencies of this target.
 CMake will then combine all the necessary information automatically.
 
+The type of the :prop_tgt:`IMPORTED` target created in the
+:command:`add_library` command can always be specified as ``UNKNOWN``
+type.  This simplifies the code in cases where static or shared variants may
+be found, and CMake will determine the type by inspecting the files.
+
 If the library is available with multiple configurations, the
 :prop_tgt:`IMPORTED_CONFIGURATIONS` target property should also be
 populated:

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e18e21aeb52923d470680aa171f722b4d3b5d01d
commit e18e21aeb52923d470680aa171f722b4d3b5d01d
Author:     Stephen Kelly <steve...@gmail.com>
AuthorDate: Thu Dec 4 23:56:21 2014 +0100
Commit:     Stephen Kelly <steve...@gmail.com>
CommitDate: Fri Dec 5 00:12:14 2014 +0100

    Help: Document IMPORTED_CONFIGURATIONS target property for Find modules.

diff --git a/Help/manual/cmake-developer.7.rst 
b/Help/manual/cmake-developer.7.rst
index 94fc019..6f7bbdc 100644
--- a/Help/manual/cmake-developer.7.rst
+++ b/Help/manual/cmake-developer.7.rst
@@ -876,7 +876,10 @@ To prevent users being overwhelmed with settings to 
configure, try to
 keep as many options as possible out of the cache, leaving at least one
 option which can be used to disable use of the module, or locate a
 not-found library (e.g. ``Xxx_ROOT_DIR``).  For the same reason, mark
-most cache options as advanced.
+most cache options as advanced.  For packages which provide both debug
+and release binaries, it is common to create cache variables with a
+``_LIBRARY_<CONFIG>`` suffix, such as ``Foo_LIBRARY_RELEASE`` and
+``Foo_LIBRARY_DEBUG``.
 
 While these are the standard variable names, you should provide
 backwards compatibility for any old names that were actually in use.
@@ -1049,6 +1052,42 @@ not any of its dependencies.  Instead, those 
dependencies should also be
 targets, and CMake should be told that they are dependencies of this target.
 CMake will then combine all the necessary information automatically.
 
+If the library is available with multiple configurations, the
+:prop_tgt:`IMPORTED_CONFIGURATIONS` target property should also be
+populated:
+
+.. code-block:: cmake
+
+  if(Foo_FOUND)
+    if (NOT TARGET Foo::Foo)
+      add_library(Foo::Foo UNKNOWN IMPORTED)
+    endif()
+    if (Foo_LIBRARY_RELEASE)
+      set_property(TARGET Foo::Foo APPEND PROPERTY
+        IMPORTED_CONFIGURATIONS RELEASE
+      )
+      set_target_properties(Foo::Foo PROPERTIES
+        IMPORTED_LOCATION_RELEASE "${Foo_LIBRARY_RELEASE}"
+      )
+    endif()
+    if (Foo_LIBRARY_DEBUG)
+      set_property(TARGET Foo::Foo APPEND PROPERTY
+        IMPORTED_CONFIGURATIONS DEBUG
+      )
+      set_target_properties(Foo::Foo PROPERTIES
+        IMPORTED_LOCATION_DEBUG "${Foo_LIBRARY_DEBUG}"
+      )
+    endif()
+    set_target_properties(Foo::Foo PROPERTIES
+      INTERFACE_COMPILE_OPTIONS "${PC_Foo_CFLAGS_OTHER}"
+      INTERFACE_INCLUDE_DIRECTORIES "${Foo_INCLUDE_DIR}"
+    )
+  endif()
+
+The ``RELEASE`` variant should be listed first in the property
+so that that variant is chosen if the user uses a configuration which is
+not an exact match for any listed ``IMPORTED_CONFIGURATIONS``.
+
 We should also provide some information about the package, such as where to
 download it.
 

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

Summary of changes:


hooks/post-receive
-- 
CMake
_______________________________________________
Cmake-commits mailing list
Cmake-commits@cmake.org
http://public.kitware.com/mailman/listinfo/cmake-commits

Reply via email to