aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2011-05-15 20:25:09 -0700
committerChris Robinson <[email protected]>2011-05-15 20:25:09 -0700
commit442e41f825211ed6edb3cfa458b4d8cd5bbd5caf (patch)
tree9f41cf228a7c6bb139d9d72900febbd01a06cafe
parente95b718cf437aa21e758f8c3c764e4bc548727e7 (diff)
Add an option to use Wine's Windows headers when building under MinGW
-rw-r--r--CMakeLists.txt16
1 files changed, 16 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a4d4c254..27eff662 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -154,6 +154,22 @@ ELSE()
ADD_DEFINITIONS(-fvisibility=internal -DHAVE_GCC_VISIBILITY)
ENDIF()
ENDIF()
+ ELSE()
+ OPTION(WINE "Enable use of Wine headers when compiling" ON)
+ IF(WINE)
+ FIND_PATH(WINE_INCLUDE_DIR library.h
+ PATHS
+ /usr/include/wine
+ /usr/local/include/wine
+ PATH_SUFFIXES ".")
+ IF(WINE_INCLUDE_DIR)
+ MESSAGE(STATUS "Found Wine header files - ${WINE_INCLUDE_DIR}" )
+ INCLUDE_DIRECTORIES("${WINE_INCLUDE_DIR}/windows")
+ SET(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} "${WINE_INCLUDE_DIR}/windows")
+ ELSE()
+ MESSAGE(STATUS "Could not find Wine header files" )
+ ENDIF()
+ ENDIF()
ENDIF()
ENDIF()