Skip to content

Commit

Permalink
Removed possibly uneeded windows flags and added exclusion for win32 …
Browse files Browse the repository at this point in the history
…folder
  • Loading branch information
MikeRavenelle committed Jan 28, 2024
1 parent 3b50591 commit de0c141
Showing 1 changed file with 2 additions and 21 deletions.
23 changes: 2 additions & 21 deletions library-conan/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,7 @@ add_compile_options(${AVX_FLAG})

if(WIN32 AND NOT MINGW)
if (NOT WINDOWS_32_BIT)
message("-- Building for windows with precompiled packaged dependencies")
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS TRUE)
add_compile_options("/bigobj")
add_compile_definitions(OPENSSL_SYS_WIN32)
message("-- Setting Windows flags")
add_compile_definitions(_WINSOCK_DEPRECATED_NO_WARNINGS)
add_compile_definitions(WIN32_LEAN_AND_MEAN)
add_compile_definitions(_CRT_SECURE_NO_WARNINGS)
Expand Down Expand Up @@ -80,22 +77,6 @@ if (UNIX)
endif()
endif()

if(NOT BUILD_SHARED_LIBS)
if(UNIX)
message("-- Building static library.")

if(UNIX AND NOT APPLE)
set(CMAKE_FIND_LIBRARY_SUFFIXES ".a")
endif()

set(OPENSSL_USE_STATIC_LIBS ON)
set(sodium_USE_STATIC_LIBS ON)
set(OPUS_USE_STATIC_LIBS TRUE)
else()
message(WARNING "-- Building of static library not supported on non UNIX systems.")
endif()
endif()

include("${CMAKE_CURRENT_SOURCE_DIR}/../cmake/colour.cmake")
if (BUILD_VOICE_SUPPORT)
if(Opus_FOUND AND libsodium_FOUND)
Expand Down Expand Up @@ -164,7 +145,7 @@ foreach (fullmodname ${subdirlist})
set (modsrc "")

file(GLOB modsrc "${modules_dir}/dpp/*.cpp" "${modules_dir}/dpp/events/*.cpp" "${modules_dir}/dpp/cluster/*.cpp" "${modules_dir}/dpp/*.rc")

if(BUILD_SHARED_LIBS)
add_library(${modname} SHARED ${modsrc})
else()
Expand Down

0 comments on commit de0c141

Please sign in to comment.