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/FindWSWinLibs.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/FindWSWinLibs.cmake')
-rw-r--r-- | cmake/modules/FindWSWinLibs.cmake | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/cmake/modules/FindWSWinLibs.cmake b/cmake/modules/FindWSWinLibs.cmake new file mode 100644 index 0000000000..3442e84ed0 --- /dev/null +++ b/cmake/modules/FindWSWinLibs.cmake @@ -0,0 +1,26 @@ +# +# $Id$ +# +# - Find WSWin Libs +# Due to the layout of the Wireshark Win support libs, +# CMake needs some support to find them +# +# The function is passed the directory name to search for and the variable +# to set in the callers scope. + +function(FindWSWinLibs _WS_LIB_SEARCH_PATH _LIB_HINT_VAR) + if (WIN32) + set( _WS_BASE_DIR $ENV{WIRESHARK_BASE_DIR} ) + set( _WS_TARGET_PLATFORM $ENV{WIRESHARK_TARGET_PLATFORM} ) + set( _PROJECT_LIB_DIR "${_WS_BASE_DIR}/wireshark-${_WS_TARGET_PLATFORM}-libs" ) + file( GLOB _SUBDIR "${_PROJECT_LIB_DIR}/*" ) + foreach( _DIR ${_SUBDIR} ) + if( IS_DIRECTORY ${dir} ) + if( "${_DIR}" matches ".*/${_WS_LIB_SEARCH_PATH}" ) + set( ${_LIB_HINT_VAR} ${_DIR} PARENT_SCOPE ) + endif() + endif() + endforeach() + endif() +endfunction(FindWSWinLibs) + |