forked from osmocom/wireshark
fa1d0be4bb
Current FindGTK2.cmake as included with Wireshark cannot do a 32-bit build even after setting CMAKE_LIBRARY_PATH=/usr/lib32. After an update to upstream FindGTK2 (v3.0.1-1824-g0b12815), things build again. Compared to upstream FindGTK2, FindWSWinLibs and related hints have been added (note that "${GTK2_HINTS}/lib" is not a typo, it is needed as some headers are includes in locations like lib/gtk-2.0/include/). The include paths have become relative again as there are no files like FindPackageHandleStandardArgs in the Wireshark source tree. Diff between upstream FindGTK2 and the version in this patch: diff --git a/cmake/modules/FindGTK2.cmake b/cmake/modules/FindGTK2.cmake index 72bb8eb..9b4f989 100644 --- a/cmake/modules/FindGTK2.cmake +++ b/cmake/modules/FindGTK2.cmake @@ -167,2 +167,5 @@ +include( FindWSWinLibs ) +FindWSWinLibs( "gtk2" "GTK2_HINTS" ) + #============================================================= @@ -176,4 +179,4 @@ -include(${CMAKE_CURRENT_LIST_DIR}/SelectLibraryConfigurations.cmake) -include(${CMAKE_CURRENT_LIST_DIR}/CMakeParseArguments.cmake) +include(SelectLibraryConfigurations) +include(CMakeParseArguments) @@ -289,2 +292,5 @@ function(_GTK2_FIND_INCLUDE_DIR _var _hdr) ${_suffixes} + HINTS + "${GTK2_HINTS}/include" + "${GTK2_HINTS}/lib" ) @@ -395,2 +401,4 @@ function(_GTK2_FIND_LIBRARY _var _lib _expand_vc _append_version) [HKEY_LOCAL_MACHINE\\SOFTWARE\\gtkmm\\2.4;Path]/lib + HINTS + "${GTK2_HINTS}/lib" ) @@ -409,2 +417,4 @@ function(_GTK2_FIND_LIBRARY _var _lib _expand_vc _append_version) [HKEY_LOCAL_MACHINE\\SOFTWARE\\gtkmm\\2.4;Path]/lib + HINTS + "${GTK2_HINTS}/lib" ) @@ -829,3 +839,3 @@ set(_GTK2_did_we_find_everything true) # This gets set to GTK2_FOUND -include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) +include(FindPackageHandleStandardArgs) Change-Id: I02103409a79ea30d1bf7cc0dfb43a9e41f8a4db3 Reviewed-on: https://code.wireshark.org/review/4293 Reviewed-by: Graham Bloice <graham.bloice@trihedral.com> Reviewed-by: Anders Broman <a.broman58@gmail.com> |
||
---|---|---|
.. | ||
modules | ||
TestFileOffsetBits.c | ||
TestLargeFiles.c.cmakein | ||
TestWindowsFSeek.c |