Skip to content

Commit

Permalink
Set the right build flag on windows instead
Browse files Browse the repository at this point in the history
  • Loading branch information
pierr3 committed Apr 14, 2024
1 parent c15d931 commit 8f3d21f
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions backend/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,20 @@ include_directories(${CMAKE_SOURCE_DIR}/extern/afv-native/include)
add_library(trackaudio-afv SHARED
src/main.cpp
${CMAKE_JS_SRC})


if (WIN32)
set_property(TARGET trackaudio-afv PROPERTY
MSVC_RUNTIME_LIBRARY "MultiThreadedDLL$<$<CONFIG:Release>:Release>")
endif()

# Find the required packages
find_package(Threads REQUIRED)
find_package(httplib CONFIG REQUIRED)
find_package(unofficial-node-addon-api CONFIG REQUIRED)
find_package(OpenSSL REQUIRED)
find_package(absl CONFIG REQUIRED)
find_package(Poco REQUIRED Util)
find_package(Poco COMPONENTS Foundation Util REQUIRED)

if (WIN32)
if(CMAKE_BUILD_TYPE STREQUAL "Release")
Expand Down Expand Up @@ -85,7 +91,7 @@ target_link_libraries(trackaudio-afv PRIVATE
unofficial::node-addon-api::node-addon-api
OpenSSL::SSL OpenSSL::Crypto
absl::strings absl::any
Poco::Util
Poco::Foundation Poco::Util
${CMAKE_JS_LIB})

# Set the output directory for the built executable
Expand Down

0 comments on commit 8f3d21f

Please sign in to comment.