Browse Source

Update CMakeLists.txt

Stanislav Denisov 1 year ago
parent
commit
bef9544349
1 changed files with 7 additions and 2 deletions
  1. 7 2
      Source/Native/CMakeLists.txt

+ 7 - 2
Source/Native/CMakeLists.txt

@@ -1,7 +1,12 @@
-cmake_minimum_required(VERSION 2.6)
+cmake_minimum_required(VERSION 2.9)
 project(enet C)
 
 set(ENET_DEBUG "0" CACHE BOOL "Enable debug functionality")
+
+if (WIN32)
+    set(ENET_EXCLUDE_WINDOWS_H "0" CACHE BOOL "Exclude \"windows.h\" header")
+endif()
+
 set(ENET_STATIC "0" CACHE BOOL "Create a static library")
 set(ENET_SHARED "0" CACHE BOOL "Create a shared library")
 
@@ -33,4 +38,4 @@ if (ENET_SHARED)
         target_link_libraries(enet winmm ws2_32)
         SET_TARGET_PROPERTIES(enet PROPERTIES PREFIX "")
     endif()
-endif()
+endif()