package/pkg-cmake.mk: add note about BUILD_STATIC_LIBS
authorJan Heylen <jan.heylen@nokia.com>
Thu, 4 Jan 2018 12:28:29 +0000 (13:28 +0100)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sun, 7 Jan 2018 20:54:27 +0000 (21:54 +0100)
As BUILD_STATIC_LIBS is not a standard cmake variable (while
BUILD_SHARED_LIBS is) we shouldn't add it in pkg-cmake.mk, although
for some packages that would make sense. Therefore, add a note so we
don't forget about this abnormality.

See: https://cmake.org/cmake/help/v3.8/manual/cmake-variables.7.html#variables-that-change-behavior

Signed-off-by: Jan Heylen <jan.heylen@nokia.com>
[Thomas: rework the comment in the code.]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/pkg-cmake.mk

index 6739704e3cf446eddb0c450402feb866ad028b00..14ffe4a88f7b4cf2629385721e001ec72de4998e 100644 (file)
@@ -80,6 +80,14 @@ ifndef $(2)_CONFIGURE_CMDS
 ifeq ($(4),target)
 
 # Configure package for target
+#
+# - We are passing BUILD_SHARED_LIBS because it is documented as a
+#   standard CMake variable to control the build of shared libraries
+#   (see https://cmake.org/cmake/help/v3.8/manual/cmake-variables.7.html#variables-that-change-behavior)
+# - We are not passing BUILD_STATIC_LIBS because it is *not*
+#   documented as a standard CMake variable. If a package supports it,
+#   it must handle it explicitly.
+#
 define $(2)_CONFIGURE_CMDS
        (mkdir -p $$($$(PKG)_BUILDDIR) && \
        cd $$($$(PKG)_BUILDDIR) && \