Skip to content

Commit

Permalink
cmake: Fix windows configure (Fix #3876)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mizux committed Aug 3, 2023
1 parent ae1f0ea commit 863a393
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,13 @@ else()
endforeach()
endif()

if(BUILD_SHARED_LIBS AND MSVC)
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
if(MSVC)
if(NOT BUILD_SHARED_LIBS)
# With CMake 3.27+ ZERO_CHECK target will create a cyclic dependencies error.
set(CMAKE_SUPPRESS_REGENERATION TRUE)
else()
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
endif()
endif()

# Disable CTest targets
Expand Down

0 comments on commit 863a393

Please sign in to comment.