Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

add option to use system enet headers

Reviewed-by: Ablu.
  • Loading branch information...
commit d754a64e3839b3888d489046546195792e4ecc34 1 parent 2305ca0
authored June 26, 2012 Ablu committed June 26, 2012

Showing 1 changed file with 10 additions and 1 deletion. Show diff stats Hide diff stats

  1. 11  libs/enet/CMakeLists.txt
11  libs/enet/CMakeLists.txt
... ...
@@ -1,3 +1,7 @@
  1
+INCLUDE(FindPkgConfig)
  2
+
  3
+OPTION(WITH_BUNDLEDHEADERS "Use bundled enet headers" ON)
  4
+
1 5
 INCLUDE(CheckFunctionExists)
2 6
 CHECK_FUNCTION_EXISTS(gethostbyaddr_r HAS_GETHOSTBYNAME_R)
3 7
 IF(HAS_GETHOSTBYNAME_R EQUAL 1)
@@ -49,7 +53,12 @@ SET (SRCS
49 53
   win32.c
50 54
   )
51 55
 
52  
-INCLUDE_DIRECTORIES("include")
  56
+IF (WITH_BUNDLEDHEADERS)
  57
+	INCLUDE_DIRECTORIES("include")
  58
+ELSE (WITH_BUNDLEDHEADERS)
  59
+	PKG_CHECK_MODULES(ENET REQUIRED libenet)
  60
+	INCLUDE_DIRECTORIES("${ENET_INCLUDEDIR}")
  61
+ENDIF()
53 62
 
54 63
 ADD_LIBRARY(enet STATIC ${SRCS})
55 64
 IF (BEOS)

0 notes on commit d754a64

Please sign in to comment.
Something went wrong with that request. Please try again.