win32_zlib.patch 777 B

123456789101112131415161718192021222324252627
  1. diff --git a/CMakeLists.txt b/CMakeLists.txt
  2. index 1656d5a..c207351 100644
  3. --- a/CMakeLists.txt
  4. +++ b/CMakeLists.txt
  5. @@ -62,6 +62,9 @@ endif ()
  6. find_package(Boost 1.65 COMPONENTS ${Boost_COMPONENTS} REQUIRED)
  7. find_package(LIBZIP REQUIRED)
  8. +if (WIN32)
  9. + find_package(ZLIB REQUIRED)
  10. +endif ()
  11. # ==============================================================================
  12. diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
  13. index bf70918..a6474a6 100644
  14. --- a/src/CMakeLists.txt
  15. +++ b/src/CMakeLists.txt
  16. @@ -112,7 +112,7 @@ target_link_libraries(fmi4cpp
  17. )
  18. if(WIN32)
  19. - target_link_libraries(fmi4cpp PRIVATE "Bcrypt")
  20. + target_link_libraries(fmi4cpp PRIVATE "Bcrypt" ZLIB::ZLIB)
  21. elseif(UNIX)
  22. target_link_libraries(fmi4cpp PRIVATE stdc++fs dl)
  23. endif()