Skip to content

Commit

Permalink
Fix mingw build
Browse files Browse the repository at this point in the history
  • Loading branch information
Tereius committed Dec 20, 2024
1 parent 3508110 commit f925d6d
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,14 @@ target_compile_definitions(onvifcommon PUBLIC WITH_SELF_PIPE PUBLIC WITH_DOM)
if (HAS_OPENSSL)
target_link_libraries(onvifcommon "${OpenSSL_ssl_PATH}" "${OpenSSL_cryptro_PATH}")
endif ()
if (WIN32 AND NOT BUILD_SHARED_LIBS)
target_link_libraries(onvifcommon qtpcre2.lib version.lib Winmm.lib Netapi32.lib Userenv.lib)
if (WIN32)
target_link_libraries(onvifcommon ws2_32)
if (NOT BUILD_SHARED_LIBS)
target_link_libraries(onvifcommon version Winmm Netapi32 Userenv)
if (HAS_OPENSSL)
target_link_libraries(onvifcommon crypt32)
endif ()
endif ()
endif ()
target_compile_features(onvifcommon PUBLIC cxx_strong_enums cxx_auto_type cxx_nullptr cxx_long_long_type cxx_explicit_conversions)
set_target_properties(onvifcommon PROPERTIES PUBLIC_HEADER "${public_header_files};${CMAKE_CURRENT_BINARY_DIR}/OnvifCommonExport.h")
Expand Down

0 comments on commit f925d6d

Please sign in to comment.