From 34693799ada6cb84be3f588aabbe75f24d010e2f Mon Sep 17 00:00:00 2001 From: paul Date: Fri, 9 Aug 2019 18:29:50 +0200 Subject: [PATCH] Adding target options to cnpy-static to be linked against as a subdirectory module --- CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9eb550f..ec52883 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,6 +19,8 @@ install(TARGETS "cnpy" LIBRARY DESTINATION lib PERMISSIONS OWNER_READ OWNER_WRIT if(ENABLE_STATIC) add_library(cnpy-static STATIC "cnpy.cpp") + target_link_libraries(cnpy-static PUBLIC ${ZLIB_LIBRARIES}) + target_include_directories(cnpy-static PUBLIC ".") set_target_properties(cnpy-static PROPERTIES OUTPUT_NAME "cnpy") install(TARGETS "cnpy-static" ARCHIVE DESTINATION lib) endif(ENABLE_STATIC)