]> git.cworth.org Git - apitrace/blobdiff - thirdparty/zlib/CMakeLists.txt
Install all thirdparty licenses.
[apitrace] / thirdparty / zlib / CMakeLists.txt
index 1721574e450803f09928fcb79964f1088e71a942..3cf970ee552ff2331a97396106801856ee0770b2 100644 (file)
@@ -1,8 +1,15 @@
-include_directories(${CMAKE_CURRENT_SOURCE_DIR})
+include_directories (${CMAKE_CURRENT_SOURCE_DIR})
 
-add_definitions(-DNO_VIZ)
+add_definitions (-DNO_VIZ)
 
-add_library (z_bundled STATIC
+# adjust warnings
+if (MSVC)
+    add_definitions (-wd4131) # uses old-style declarator
+else ()
+    add_definitions (-DHAVE_UNISTD_H)
+endif ()
+
+add_library (z_bundled STATIC EXCLUDE_FROM_ALL
     adler32.c
     compress.c
     crc32.c
@@ -23,3 +30,9 @@ add_library (z_bundled STATIC
 set_target_properties (z_bundled PROPERTIES
     COMPILE_FLAGS "${CMAKE_SHARED_LIBRARY_C_FLAGS}"
 )
+
+install (
+    FILES README
+    DESTINATION ${DOC_INSTALL_DIR}
+    RENAME LICENSE-zlib.txt
+)