Skip to content

Commit b66d7c2

Browse files
authored
Explicit remark about BUILD_SHARED_LIBS (signal11#349)
- a remark about using BUILD_SHARED_LIBS as a CACHE variable and CMP0077.
1 parent 20a16a1 commit b66d7c2

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

BUILD.cmake.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,12 @@ set(BUILD_SHARED_LIBS FALSE) # HIDAPI as static library on all platforms
179179
add_subdirectory(hidapi)
180180
```
181181

182+
<details>
183+
<summary>NOTE</summary>
184+
185+
If you project happen to use `BUILD_SHARED_LIBS` as a `CACHE` variable globally for you project, setting it as simple variable, as showed above _will have not affect_ up until _CMake 3.13_. See [CMP0077](https://cmake.org/cmake/help/latest/policy/CMP0077.html) for details.
186+
</details><br>
187+
182188
There are several important differences in the behavior of HIDAPI CMake build system when CMake is built as standalone package vs subdirectory build:
183189

184190
1) In _standalone build_ a number of standard and HIDAPI-specific variables are marked as _cache variables_ or _options_.

0 commit comments

Comments
 (0)