]> git.ipfire.org Git - thirdparty/json-c.git/commitdiff
update
authordota17 <chenguopingdota@163.com>
Thu, 7 May 2020 06:50:43 +0000 (14:50 +0800)
committerdota17 <chenguopingdota@163.com>
Thu, 7 May 2020 06:50:43 +0000 (14:50 +0800)
CMakeLists.txt
README.md

index dc84b5226beefd99ace6e777dd2ef65937774a0a..dc36d1893b93965fa9e915c3e74fcc4ec32b0d9e 100644 (file)
@@ -69,6 +69,7 @@ include(GNUInstallDirs)
 include(CMakePackageConfigHelpers)
 
 option(BUILD_SHARED_LIBS  "Default to building shared libraries" ON)
+option(BUILD_STATIC_LIBS  "Default to building static libraries" ON)
 
 # Generate a release merge and test it to verify the correctness of republishing the package.
 ADD_CUSTOM_TARGET(distcheck
@@ -412,12 +413,6 @@ if (BUILD_STATIC_LIBS)
     set_target_properties(${ORIGINAL_STATIC_LIB_NAME} PROPERTIES
         OUTPUT_NAME ${PROJECT_NAME}
     )
-
-    target_include_directories(${PROJECT_NAME}
-        PUBLIC
-            $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}>
-            $<BUILD_INTERFACE:${PROJECT_BINARY_DIR}>
-    )
 endif ()
 
 # Always create new install dirs with 0755 permissions, regardless of umask
index 909fd116bf95877b8be789c79927077ec2f9e4b2..f5a7ee39b4be1be45888fcb784643359c68598f2 100644 (file)
--- a/README.md
+++ b/README.md
@@ -97,8 +97,8 @@ Variable             | Type   | Description
 ---------------------|--------|--------------
 CMAKE_INSTALL_PREFIX | String | The install location.
 CMAKE_BUILD_TYPE     | String | Defaults to "debug"
-BUILD_SHARED_LIBS    | Bool   | The default build generates a dynamic (dll/so) library.  Set this to OFF to create a static library instead.
-BUILD_STATIC_LIBS    | Bool   | This build generates a static (lib/a) library.
+BUILD_SHARED_LIBS    | Bool   | The default build generates a dynamic (dll/so) library.  Set this to OFF to create a static library only.
+BUILD_STATIC_LIBS    | Bool   | The default build generates a static (lib/a) library.  Set this to OFF to create a shared library only.
 ENABLE_RDRAND        | Bool   | Enable RDRAND Hardware RNG Hash Seed
 ENABLE_THREADING     | Bool   | Enable partial threading support
 DISABLE_WERROR       | Bool   | Disable use of -Werror
@@ -107,16 +107,10 @@ DISABLE_BSYMBOLIC    | Bool   | Disable use of -Bsymbolic-functions
 Pass these options as `-D` on CMake's command-line.
 
 ```sh
-# build a static library
+# build a static library only
 cmake -DBUILD_SHARED_LIBS=OFF ..
 ```
 
-Allow to build both static and shared libraries.
-
-```sh
-cmake -DBUILD_STATIC_LIBS=ON ..
-```
-
 ### Building with partial threading support
 
 Although json-c does not support fully multi-threaded access to