Skip to content

Commit

Permalink
CMake: Enable shared builds (#242)
Browse files Browse the repository at this point in the history
  • Loading branch information
Croydon committed Apr 18, 2024
1 parent 276ff5a commit ca56fec
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion CMakeLists.txt
Expand Up @@ -84,7 +84,12 @@ set(SOURCE_FILES
source_group(include FILES ${INCLUDE_FILES})
source_group(source FILES ${SOURCE_FILES})

add_library(enet STATIC
if(WIN32 AND BUILD_SHARED_LIBS AND (MSVC OR CMAKE_CXX_COMPILER_ID MATCHES "Clang"))
add_definitions(-DENET_DLL=1)
add_definitions(-DENET_BUILDING_LIB)
endif()

add_library(enet
${INCLUDE_FILES}
${SOURCE_FILES}
)
Expand Down

0 comments on commit ca56fec

Please sign in to comment.