diff options
author | Jörg Mayer <jmayer@loplof.de> | 2013-09-23 21:45:55 +0000 |
---|---|---|
committer | Jörg Mayer <jmayer@loplof.de> | 2013-09-23 21:45:55 +0000 |
commit | d456079b7e928007d4130ffb4ab5ccf49c98481e (patch) | |
tree | dba40805065d07057c21b5b77dbb76ec1419bd05 /cmake/modules/FindGMODULE2.cmake | |
parent | d74564d6cf9d5e5d5927b51d31220db1c51409e7 (diff) |
Beginnings of win cmake support (not yet working), created by Graham Bloice,
some smaller changes by me.
- README.cmake
Document how to (one day) run on Windows
- CMakeLists.txt
Use MSVC compiler flags for MSVC instead of gcc flags
- FindWSWinLibs.cmake
New: Creates HINTS for finding includes and libraries
inside the Wireshark support library installation.
- FindXXX.cmake
Make use of HINTS generated by FindWSWinLibs.cmake
This has not really been tested on Windows as my installation seems to have
automagically downloaded some fixes and is in an inconsistent state since.
Will probably need to reinstall.
svn path=/trunk/; revision=52194
Diffstat (limited to 'cmake/modules/FindGMODULE2.cmake')
-rw-r--r-- | cmake/modules/FindGMODULE2.cmake | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/cmake/modules/FindGMODULE2.cmake b/cmake/modules/FindGMODULE2.cmake index bb99067a02..2367bb6e26 100644 --- a/cmake/modules/FindGMODULE2.cmake +++ b/cmake/modules/FindGMODULE2.cmake @@ -1,12 +1,12 @@ # # $Id$ # -# - Try to find GModule2 +# - Try to find GModule2 # Find GModule headers, libraries and the answer to all questions. # # GMODULE2_FOUND True if GMODULE2 got found -# GMODULE2_INCLUDE_DIRS Location of GMODULE2 headers -# GMODULE2_LIBRARIES List of libraries to use GMODULE2 +# GMODULE2_INCLUDE_DIRS Location of GMODULE2 headers +# GMODULE2_LIBRARIES List of libraries to use GMODULE2 # # Copyright (c) 2008 Bjoern Ricks <bjoern.ricks@googlemail.com> # @@ -20,7 +20,7 @@ INCLUDE( FindPkgConfig ) IF ( GMODULE2_FIND_REQUIRED ) SET( _pkgconfig_REQUIRED "REQUIRED" ) ELSE( GMODULE2_FIND_REQUIRED ) - SET( _pkgconfig_REQUIRED "" ) + SET( _pkgconfig_REQUIRED "" ) ENDIF ( GMODULE2_FIND_REQUIRED ) IF ( GMODULE2_MIN_VERSION ) @@ -31,26 +31,30 @@ ENDIF ( GMODULE2_MIN_VERSION ) IF( NOT GMODULE2_FOUND AND NOT PKG_CONFIG_FOUND ) - FIND_PATH( GMODULE2_INCLUDE_DIRS gmodule.h PATH_SUFFIXES glib-2.0 ) + + INCLUDE(FindWSWinLibs) + FindWSWinLibs("gtk2" "GMODULE2_HINTS") + + FIND_PATH( GMODULE2_INCLUDE_DIRS gmodule.h PATH_SUFFIXES glib-2.0 HINTS "${GMODULE2_HINTS}/include" ) IF ( APPLE ) FIND_LIBRARY( GMODULE2_LIBRARIES glib ) ELSE ( APPLE ) - FIND_LIBRARY( GMODULE2_LIBRARIES NAMES gmodule-2.0 gmodule ) + FIND_LIBRARY( GMODULE2_LIBRARIES NAMES gmodule-2.0 gmodule HINTS "${GMODULE2_HINTS}/lib" ) ENDIF (APPLE) # Report results - IF ( GMODULE2_LIBRARIES AND GMODULE2_INCLUDE_DIRS ) + IF ( GMODULE2_LIBRARIES AND GMODULE2_INCLUDE_DIRS ) SET( GMODULE2_FOUND 1 ) IF ( NOT GMODULE2_FIND_QUIETLY ) MESSAGE( STATUS "Found GMODULE2: ${GMODULE2_LIBRARIES} ${GMODULE2_INCLUDE_DIRS}" ) ENDIF ( NOT GMODULE2_FIND_QUIETLY ) - ELSE ( GMODULE2_LIBRARIES AND GMODULE2_INCLUDE_DIRS ) + ELSE ( GMODULE2_LIBRARIES AND GMODULE2_INCLUDE_DIRS ) IF ( GMODULE2_FIND_REQUIRED ) MESSAGE( SEND_ERROR "Could NOT find GMODULE2" ) ELSE ( GMODULE2_FIND_REQUIRED ) IF ( NOT GMODULE2_FIND_QUIETLY ) - MESSAGE( STATUS "Could NOT find GMODULE2" ) + MESSAGE( STATUS "Could NOT find GMODULE2" ) ENDIF ( NOT GMODULE2_FIND_QUIETLY ) ENDIF ( GMODULE2_FIND_REQUIRED ) ENDIF ( GMODULE2_LIBRARIES AND GMODULE2_INCLUDE_DIRS ) |