Skip to content

Commit

Permalink
Link against bcrypt.lib on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
TobiasFella committed Sep 1, 2024
1 parent 0cdc457 commit 922ca18
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ add_library(vodozemac-cpp SHARED)
target_sources(vodozemac-cpp PRIVATE src/dummy.cpp)
# We need to link to the whole archive, otherwise important symbols are thrown away
target_link_libraries(vodozemac-cpp PRIVATE "$<LINK_LIBRARY:WHOLE_ARCHIVE,vodozemac-static>")

if(WIN32)
target_link_libraries(vodozemac-cpp PRIVATE Bcrypt.lib)
endif()
target_include_directories(vodozemac-cpp INTERFACE "$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/VodozemacCpp>")

set_target_properties(vodozemac-cpp PROPERTIES
Expand All @@ -64,4 +68,4 @@ install(FILES
COMPONENT Devel
)

install(EXPORT VodozemacTargets DESTINATION "${CMAKECONFIG_INSTALL_DIR}" FILE VodozemacTargets.cmake NAMESPACE Vodozemac::)
install(EXPORT VodozemacTargets DESTINATION "${CMAKECONFIG_INSTALL_DIR}" FILE VodozemacTargets.cmake NAMESPACE Vodozemac::)

0 comments on commit 922ca18

Please sign in to comment.