Skip to content

Commit

Permalink
dont use hunter, merged with libzip fork
Browse files Browse the repository at this point in the history
  • Loading branch information
Tristan Walter committed Nov 20, 2018
1 parent fdfe19b commit 7a515b4
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,13 @@ target_compile_features(cnpy PRIVATE cxx_std_14)
install(TARGETS "cnpy" LIBRARY DESTINATION lib PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)

if(ENABLE_STATIC)
add_library(cnpy STATIC "cnpy.cpp")
set_target_properties(cnpy PROPERTIES OUTPUT_NAME "cnpy")

install(TARGETS "cnpy" ARCHIVE DESTINATION lib)
else()
add_library(cnpy SHARED "cnpy.cpp")
set_target_properties(cnpy PROPERTIES POSITION_INDEPENDENT_CODE ON)
target_link_libraries(cnpy PUBLIC ZLIB::zlib)#${ZLIB_LIBRARIES})
add_library(cnpy-static STATIC "cnpy.cpp")
set_target_properties(cnpy-static PROPERTIES OUTPUT_NAME "cnpy")
install(TARGETS "cnpy-static" ARCHIVE DESTINATION lib)
endif(ENABLE_STATIC)

install(FILES "cnpy.h" DESTINATION include)
install(FILES "mat2npz" "npy2mat" "npz2mat" DESTINATION bin PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)

add_executable(example1 example1.cpp)
target_link_libraries(example1 cnpy ZLIB::zlib)
target_link_libraries(example1 cnpy)

0 comments on commit 7a515b4

Please sign in to comment.