diff options
author | Michael Keck <[email protected]> | 2024-04-18 21:52:47 +0200 |
---|---|---|
committer | GitHub <[email protected]> | 2024-04-18 15:52:47 -0400 |
commit | ca56fecaf35f6031b30d1573b8e772d7c81abcb4 (patch) | |
tree | 7c7b8710a6654c0c8f4dc8017acae039b584ec79 | |
parent | 276ff5ae05a245bcee195af9c9fd002851517d40 (diff) | |
download | enet-ca56fecaf35f6031b30d1573b8e772d7c81abcb4.tar.gz enet-ca56fecaf35f6031b30d1573b8e772d7c81abcb4.zip |
CMake: Enable shared builds (#242)
-rw-r--r-- | CMakeLists.txt | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 9f225fb..61cef93 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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} ) |