mirror of
https://github.com/lsalzman/enet
synced 2024-11-21 06:25:59 -07:00
CMake: Enable shared builds (#242)
This commit is contained in:
parent
276ff5ae05
commit
ca56fecaf3
1 changed files with 6 additions and 1 deletions
|
@ -84,7 +84,12 @@ set(SOURCE_FILES
|
||||||
source_group(include FILES ${INCLUDE_FILES})
|
source_group(include FILES ${INCLUDE_FILES})
|
||||||
source_group(source FILES ${SOURCE_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}
|
${INCLUDE_FILES}
|
||||||
${SOURCE_FILES}
|
${SOURCE_FILES}
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue