|
|
@@ -1,10 +1,10 @@
|
|
|
-cmake_minimum_required(VERSION 2.6)
|
|
|
+cmake_minimum_required(VERSION 3.1)
|
|
|
project(enet C)
|
|
|
|
|
|
-set(ENET_DEBUG "0" CACHE BOOL "Enable debug functionality")
|
|
|
-set(ENET_STATIC "0" CACHE BOOL "Create a static library")
|
|
|
-set(ENET_SHARED "0" CACHE BOOL "Create a shared library")
|
|
|
-set(ENET_LZ4 "0" CACHE BOOL "Add support for an optional packet-level compression")
|
|
|
+set(ENET_DEBUG OFF CACHE BOOL "Enable debug functionality")
|
|
|
+set(ENET_STATIC OFF CACHE BOOL "Create a static library")
|
|
|
+set(ENET_SHARED OFF CACHE BOOL "Create a shared library")
|
|
|
+set(ENET_LZ4 OFF CACHE BOOL "Add support for an optional packet-level compression")
|
|
|
|
|
|
if (ENET_DEBUG)
|
|
|
add_definitions(-DENET_DEBUG)
|
|
|
@@ -20,6 +20,7 @@ if (ENET_STATIC)
|
|
|
|
|
|
if (WIN32)
|
|
|
target_link_libraries(enet_static winmm ws2_32)
|
|
|
+ target_compile_definitions(enet PRIVATE _CRT_SECURE_NO_WARNINGS)
|
|
|
SET_TARGET_PROPERTIES(enet_static PROPERTIES PREFIX "")
|
|
|
endif()
|
|
|
endif()
|
|
|
@@ -30,6 +31,7 @@ if (ENET_SHARED)
|
|
|
|
|
|
if (WIN32)
|
|
|
target_link_libraries(enet winmm ws2_32)
|
|
|
+ target_compile_definitions(enet PRIVATE _CRT_SECURE_NO_WARNINGS)
|
|
|
SET_TARGET_PROPERTIES(enet PROPERTIES PREFIX "")
|
|
|
endif()
|
|
|
endif()
|