diff options
| author | Petr Mrázek <peterix@gmail.com> | 2015-09-23 00:38:31 +0200 |
|---|---|---|
| committer | Petr Mrázek <peterix@gmail.com> | 2015-09-23 00:44:46 +0200 |
| commit | 9d17b0a9b93e684a5ac6cac8f70d9a7909a877cf (patch) | |
| tree | 6d8dea54190d287d6eb8303a997591872bcefcbf | |
| parent | 076647597f2ebb6f243f34aacaacf0a974752085 (diff) | |
| download | Project-Tick-9d17b0a9b93e684a5ac6cac8f70d9a7909a877cf.tar.gz Project-Tick-9d17b0a9b93e684a5ac6cac8f70d9a7909a877cf.zip | |
Fix CMake CMP0063 warning when building static
| -rw-r--r-- | CMakeLists.txt | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 9fc6bf1122..cda1297027 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -45,9 +45,12 @@ if(NBT_USE_ZLIB) endif() target_compile_options(nbt++ PUBLIC -std=c++11) generate_export_header(nbt++ BASE_NAME nbt) -set_target_properties(nbt++ PROPERTIES - CXX_VISIBILITY_PRESET hidden - VISIBILITY_INLINES_HIDDEN 1) + +if(${BUILD_SHARED_LIBS}) + set_target_properties(nbt++ PROPERTIES + CXX_VISIBILITY_PRESET hidden + VISIBILITY_INLINES_HIDDEN 1) +endif() if(NBT_BUILD_TESTS) enable_testing() |
