Skip to content

Commit

Permalink
Include path for zlib on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
certik committed Mar 4, 2021
1 parent b384107 commit e4f303d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,13 @@ if (WITH_LLVM)
$<$<COMPILE_LANGUAGE:CXX>:${LFORTRAN_CXX_NO_RTTI_FLAG}>)
set_property(TARGET p::llvm PROPERTY INTERFACE_LINK_LIBRARIES
${llvm_libs})
if (MSVC)
# LLVM on Windows appends zlib shared library and we must provide
# a path to find it:
get_filename_component(mypath ${ZLIB_LIBRARY} DIRECTORY)
target_link_directories(p::llvm BEFORE INTERFACE ${mypath})
message(STATUS "ZLIB LIBRARY PATH: ${mypath}")
endif()
set(HAVE_LFORTRAN_LLVM yes)
endif()

Expand Down

0 comments on commit e4f303d

Please sign in to comment.