diff options
-rw-r--r-- | README.cmake | 10 | ||||
-rw-r--r-- | cmake/modules/FindGTHREAD2.cmake | 13 | ||||
-rw-r--r-- | cmake/modules/FindWSWinLibs.cmake | 11 |
3 files changed, 24 insertions, 10 deletions
diff --git a/README.cmake b/README.cmake index 2061f8d527..1fa2f7c8a8 100644 --- a/README.cmake +++ b/README.cmake @@ -73,10 +73,14 @@ Note 3: How to do an out of tree build using Visual C++ 2013: [This is advanced alpha and should build all executables except the GTK3 Wireshark for 32-bit.] -1) Follow http://www.wireshark.org/docs/wsdg_html_chunked/ChSetupWin32.html +1) Follow https://www.wireshark.org/docs/wsdg_html_chunked/ChSetupWin32.html Steps 1-9 -1a) Set WIRESHARK_BASE_DIR=c:\wireshark (the parent directory of the - library directory). +1a) Set the library search path. + If you set WIRESHARK_LIB_DIR, it will be used as the top-level library + directory. + If you set WIRESHARK_BASE_DIR, + %WIRESHARK_BASE_DIR%\wireshark-%WIRESHARK_TARGET_PLATFORM%-libs will + be used as the top-level library directory. 1b) set WIRESHARK_TARGET_PLATFORM=win32 (or win64) 1c) set QT5_BASE_DIR=C:\Qt\5.3\msvc2013_opengl (must match the Qt component path on your system) diff --git a/cmake/modules/FindGTHREAD2.cmake b/cmake/modules/FindGTHREAD2.cmake index 228236a7ab..417e25c32d 100644 --- a/cmake/modules/FindGTHREAD2.cmake +++ b/cmake/modules/FindGTHREAD2.cmake @@ -38,10 +38,15 @@ else() endif() find_path( GTHREAD2_INCLUDE_DIRS gthread.h PATH_SUFFIXES glib-2.0 glib GLib.framework/Headers/glib glib-2.0/glib HINTS "${GTHREAD2_HINTS}/include" ) find_library( GTHREAD2_LIBRARIES gthread-2.0 HINTS "${GTHREAD2_HINTS}/lib" ) - if( NOT GTHREAD2_LIBRARIES AND APPLE ) - # Fallback as APPLE glib libs already contain this - except - # Homebrew which needs the non-Apple setup - find_library( GTHREAD2_LIBRARIES glib ) + if( NOT GTHREAD2_LIBRARIES ) + # GLib contains GThread in some cases. + if( APPLE ) + # Fallback as APPLE glib libs already contain this - except + # Homebrew which needs the non-Apple setup + find_library( GTHREAD2_LIBRARIES glib ) + elseif( WIN32 ) + find_library( GTHREAD2_LIBRARIES glib-2.0 HINTS "${GTHREAD2_HINTS}/lib" ) + endif() endif() include( FindPackageHandleStandardArgs ) find_package_handle_standard_args( GTHREAD2 DEFAULT_MSG GTHREAD2_LIBRARIES GTHREAD2_INCLUDE_DIRS ) diff --git a/cmake/modules/FindWSWinLibs.cmake b/cmake/modules/FindWSWinLibs.cmake index c1ec4b1d9b..828cb8b63d 100644 --- a/cmake/modules/FindWSWinLibs.cmake +++ b/cmake/modules/FindWSWinLibs.cmake @@ -11,9 +11,14 @@ function( FindWSWinLibs _WS_LIB_SEARCH_PATH _LIB_HINT_VAR ) if( ARGN ) set( _PROJECT_LIB_DIR ${ARGN} ) else() - file( TO_CMAKE_PATH "$ENV{WIRESHARK_BASE_DIR}" _WS_BASE_DIR ) - set( _WS_TARGET_PLATFORM $ENV{WIRESHARK_TARGET_PLATFORM} ) - set( _PROJECT_LIB_DIR "${_WS_BASE_DIR}/wireshark-${_WS_TARGET_PLATFORM}-libs" ) + if( DEFINED ENV{WIRESHARK_LIB_DIR} ) + # The buildbots set WIRESHARK_LIB_DIR but not WIRESHARK_BASE_DIR. + file( TO_CMAKE_PATH "$ENV{WIRESHARK_LIB_DIR}" _PROJECT_LIB_DIR ) + else() + file( TO_CMAKE_PATH "$ENV{WIRESHARK_BASE_DIR}" _WS_BASE_DIR ) + set( _WS_TARGET_PLATFORM $ENV{WIRESHARK_TARGET_PLATFORM} ) + set( _PROJECT_LIB_DIR "${_WS_BASE_DIR}/wireshark-${_WS_TARGET_PLATFORM}-libs" ) + endif() endif() file( GLOB _SUBDIR "${_PROJECT_LIB_DIR}/*" ) foreach( _DIR ${_SUBDIR} ) |