aboutsummaryrefslogtreecommitdiffstats
path: root/tools/dissectors/cmake/Modules
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2018-11-13 21:53:22 -0800
committerBrent Stapleton <bstapleton@g.hmc.edu>2018-11-14 14:10:09 -0800
commita69ab0c23a0c38e3fed3e412df36538d8959d23c (patch)
treee6669a138dad84f79c46588f43a38c69dda90246 /tools/dissectors/cmake/Modules
parent4247f025020d7dd1f696dfbd3cce248957d6ace7 (diff)
downloaduhd-a69ab0c23a0c38e3fed3e412df36538d8959d23c.tar.gz
uhd-a69ab0c23a0c38e3fed3e412df36538d8959d23c.tar.bz2
uhd-a69ab0c23a0c38e3fed3e412df36538d8959d23c.zip
cmake: Update coding style to use lowercase commands
Also updates our coding style file. Ancient CMake versions required upper-case commands. Later command names became case-insensitive. Now the preferred style is lower-case. Run the following shell code (with GNU compliant sed): cmake --help-command-list | grep -v "cmake version" | while read c; do echo 's/\b'"$(echo $c | tr '[:lower:]' '[:upper:]')"'\(\s*\)(/'"$c"'\1(/g' done > convert.sed \ && git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' \ '*CMakeLists.txt' | xargs -0 gsed -i -f convert.sed && rm convert.sed (Make sure the backslashes don't get mangled!)
Diffstat (limited to 'tools/dissectors/cmake/Modules')
-rw-r--r--tools/dissectors/cmake/Modules/FindGLIB2.cmake188
-rw-r--r--tools/dissectors/cmake/Modules/FindWireshark.cmake14
2 files changed, 101 insertions, 101 deletions
diff --git a/tools/dissectors/cmake/Modules/FindGLIB2.cmake b/tools/dissectors/cmake/Modules/FindGLIB2.cmake
index ae7baddbb..e51c0b882 100644
--- a/tools/dissectors/cmake/Modules/FindGLIB2.cmake
+++ b/tools/dissectors/cmake/Modules/FindGLIB2.cmake
@@ -24,36 +24,36 @@
#
-IF (GLIB2_LIBRARIES AND GLIB2_INCLUDE_DIRS )
+if (GLIB2_LIBRARIES AND GLIB2_INCLUDE_DIRS )
# in cache already
- SET(GLIB2_FOUND TRUE)
-ELSE (GLIB2_LIBRARIES AND GLIB2_INCLUDE_DIRS )
+ set(GLIB2_FOUND TRUE)
+else (GLIB2_LIBRARIES AND GLIB2_INCLUDE_DIRS )
- INCLUDE(FindPkgConfig)
+ include(FindPkgConfig)
## Glib
- IF ( GLIB2_FIND_REQUIRED )
- SET( _pkgconfig_REQUIRED "REQUIRED" )
- ELSE ( GLIB2_FIND_REQUIRED )
- SET( _pkgconfig_REQUIRED "" )
- ENDIF ( GLIB2_FIND_REQUIRED )
+ if ( GLIB2_FIND_REQUIRED )
+ set( _pkgconfig_REQUIRED "REQUIRED" )
+ else ( GLIB2_FIND_REQUIRED )
+ set( _pkgconfig_REQUIRED "" )
+ endif ( GLIB2_FIND_REQUIRED )
- IF ( GLIB2_MIN_VERSION )
+ if ( GLIB2_MIN_VERSION )
PKG_SEARCH_MODULE( GLIB2 ${_pkgconfig_REQUIRED} glib-2.0>=${GLIB2_MIN_VERSION} )
- ELSE ( GLIB2_MIN_VERSION )
+ else ( GLIB2_MIN_VERSION )
PKG_SEARCH_MODULE( GLIB2 ${_pkgconfig_REQUIRED} glib-2.0 )
- ENDIF ( GLIB2_MIN_VERSION )
- IF ( PKG_CONFIG_FOUND )
- IF ( GLIB2_FOUND )
- SET ( GLIB2_CORE_FOUND TRUE )
- ELSE ( GLIB2_FOUND )
- SET ( GLIB2_CORE_FOUND FALSE )
- ENDIF ( GLIB2_FOUND )
- ENDIF ( PKG_CONFIG_FOUND )
+ endif ( GLIB2_MIN_VERSION )
+ if ( PKG_CONFIG_FOUND )
+ if ( GLIB2_FOUND )
+ set ( GLIB2_CORE_FOUND TRUE )
+ else ( GLIB2_FOUND )
+ set ( GLIB2_CORE_FOUND FALSE )
+ endif ( GLIB2_FOUND )
+ endif ( PKG_CONFIG_FOUND )
# Look for glib2 include dir and libraries w/o pkgconfig
- IF ( NOT GLIB2_FOUND AND NOT PKG_CONFIG_FOUND )
- FIND_PATH(
+ if ( NOT GLIB2_FOUND AND NOT PKG_CONFIG_FOUND )
+ find_path(
_glibconfig_include_DIR
NAMES
glibconfig.h
@@ -71,7 +71,7 @@ ELSE (GLIB2_LIBRARIES AND GLIB2_INCLUDE_DIRS )
glib-2.0/include
)
- FIND_PATH(
+ find_path(
_glib2_include_DIR
NAMES
glib.h
@@ -85,9 +85,9 @@ ELSE (GLIB2_LIBRARIES AND GLIB2_INCLUDE_DIRS )
glib-2.0
)
- #MESSAGE(STATUS "Glib headers: ${_glib2_include_DIR}")
+ #message(STATUS "Glib headers: ${_glib2_include_DIR}")
- FIND_LIBRARY(
+ find_library(
_glib2_link_DIR
NAMES
glib-2.0
@@ -99,23 +99,23 @@ ELSE (GLIB2_LIBRARIES AND GLIB2_INCLUDE_DIRS )
/usr/lib
/usr/local/lib
)
- IF ( _glib2_include_DIR AND _glib2_link_DIR )
- SET ( _glib2_FOUND TRUE )
- ENDIF ( _glib2_include_DIR AND _glib2_link_DIR )
+ if ( _glib2_include_DIR AND _glib2_link_DIR )
+ set ( _glib2_FOUND TRUE )
+ endif ( _glib2_include_DIR AND _glib2_link_DIR )
- IF ( _glib2_FOUND )
- SET ( GLIB2_INCLUDE_DIRS ${_glib2_include_DIR} ${_glibconfig_include_DIR} )
- SET ( GLIB2_LIBRARIES ${_glib2_link_DIR} )
- SET ( GLIB2_CORE_FOUND TRUE )
- ELSE ( _glib2_FOUND )
- SET ( GLIB2_CORE_FOUND FALSE )
- ENDIF ( _glib2_FOUND )
+ if ( _glib2_FOUND )
+ set ( GLIB2_INCLUDE_DIRS ${_glib2_include_DIR} ${_glibconfig_include_DIR} )
+ set ( GLIB2_LIBRARIES ${_glib2_link_DIR} )
+ set ( GLIB2_CORE_FOUND TRUE )
+ else ( _glib2_FOUND )
+ set ( GLIB2_CORE_FOUND FALSE )
+ endif ( _glib2_FOUND )
# Handle dependencies
# libintl
- IF ( NOT LIBINTL_FOUND )
- FIND_PATH(LIBINTL_INCLUDE_DIR
+ if ( NOT LIBINTL_FOUND )
+ find_path(LIBINTL_INCLUDE_DIR
NAMES
libintl.h
PATHS
@@ -126,7 +126,7 @@ ELSE (GLIB2_LIBRARIES AND GLIB2_INCLUDE_DIRS )
/usr/local/include
)
- FIND_LIBRARY(LIBINTL_LIBRARY
+ find_library(LIBINTL_LIBRARY
NAMES
intl
PATHS
@@ -137,14 +137,14 @@ ELSE (GLIB2_LIBRARIES AND GLIB2_INCLUDE_DIRS )
/usr/lib
)
- IF (LIBINTL_LIBRARY AND LIBINTL_INCLUDE_DIR)
- SET (LIBINTL_FOUND TRUE)
- ENDIF (LIBINTL_LIBRARY AND LIBINTL_INCLUDE_DIR)
- ENDIF ( NOT LIBINTL_FOUND )
+ if (LIBINTL_LIBRARY AND LIBINTL_INCLUDE_DIR)
+ set (LIBINTL_FOUND TRUE)
+ endif (LIBINTL_LIBRARY AND LIBINTL_INCLUDE_DIR)
+ endif ( NOT LIBINTL_FOUND )
# libiconv
- IF ( NOT LIBICONV_FOUND )
- FIND_PATH(LIBICONV_INCLUDE_DIR
+ if ( NOT LIBICONV_FOUND )
+ find_path(LIBICONV_INCLUDE_DIR
NAMES
iconv.h
PATHS
@@ -159,7 +159,7 @@ ELSE (GLIB2_LIBRARIES AND GLIB2_INCLUDE_DIRS )
glib-2.0
)
- FIND_LIBRARY(LIBICONV_LIBRARY
+ find_library(LIBICONV_LIBRARY
NAMES
iconv
PATHS
@@ -170,69 +170,69 @@ ELSE (GLIB2_LIBRARIES AND GLIB2_INCLUDE_DIRS )
/usr/local/lib
)
- IF (LIBICONV_LIBRARY AND LIBICONV_INCLUDE_DIR)
- SET (LIBICONV_FOUND TRUE)
- ENDIF (LIBICONV_LIBRARY AND LIBICONV_INCLUDE_DIR)
- ENDIF ( NOT LIBICONV_FOUND )
+ if (LIBICONV_LIBRARY AND LIBICONV_INCLUDE_DIR)
+ set (LIBICONV_FOUND TRUE)
+ endif (LIBICONV_LIBRARY AND LIBICONV_INCLUDE_DIR)
+ endif ( NOT LIBICONV_FOUND )
- IF (LIBINTL_FOUND)
- SET (GLIB2_LIBRARIES ${GLIB2_LIBRARIES} ${LIBINTL_LIBRARY})
- SET (GLIB2_INCLUDE_DIRS ${GLIB2_INCLUDE_DIRS} ${LIBINTL_INCLUDE_DIR})
- ENDIF (LIBINTL_FOUND)
+ if (LIBINTL_FOUND)
+ set (GLIB2_LIBRARIES ${GLIB2_LIBRARIES} ${LIBINTL_LIBRARY})
+ set (GLIB2_INCLUDE_DIRS ${GLIB2_INCLUDE_DIRS} ${LIBINTL_INCLUDE_DIR})
+ endif (LIBINTL_FOUND)
- IF (LIBICONV_FOUND)
- SET (GLIB2_LIBRARIES ${GLIB2_LIBRARIES} ${LIBICONV_LIBRARY})
- SET (GLIB2_INCLUDE_DIRS ${GLIB2_INCLUDE_DIRS} ${LIBICONV_INCLUDE_DIR})
- ENDIF (LIBICONV_FOUND)
+ if (LIBICONV_FOUND)
+ set (GLIB2_LIBRARIES ${GLIB2_LIBRARIES} ${LIBICONV_LIBRARY})
+ set (GLIB2_INCLUDE_DIRS ${GLIB2_INCLUDE_DIRS} ${LIBICONV_INCLUDE_DIR})
+ endif (LIBICONV_FOUND)
- ENDIF ( NOT GLIB2_FOUND AND NOT PKG_CONFIG_FOUND )
+ endif ( NOT GLIB2_FOUND AND NOT PKG_CONFIG_FOUND )
##
- IF (GLIB2_CORE_FOUND AND GLIB2_INCLUDE_DIRS AND GLIB2_LIBRARIES)
- SET (GLIB2_FOUND TRUE)
- ENDIF (GLIB2_CORE_FOUND AND GLIB2_INCLUDE_DIRS AND GLIB2_LIBRARIES)
+ if (GLIB2_CORE_FOUND AND GLIB2_INCLUDE_DIRS AND GLIB2_LIBRARIES)
+ set (GLIB2_FOUND TRUE)
+ endif (GLIB2_CORE_FOUND AND GLIB2_INCLUDE_DIRS AND GLIB2_LIBRARIES)
- IF (GLIB2_FOUND)
- IF (NOT GLIB2_FIND_QUIETLY)
- MESSAGE (STATUS "Found GLib2: ${GLIB2_LIBRARIES} ${GLIB2_INCLUDE_DIRS}")
- ENDIF (NOT GLIB2_FIND_QUIETLY)
- ELSE (GLIB2_FOUND)
- IF (GLIB2_FIND_REQUIRED)
- MESSAGE (SEND_ERROR "Could not find GLib2")
- ENDIF (GLIB2_FIND_REQUIRED)
- ENDIF (GLIB2_FOUND)
+ if (GLIB2_FOUND)
+ if (NOT GLIB2_FIND_QUIETLY)
+ message (STATUS "Found GLib2: ${GLIB2_LIBRARIES} ${GLIB2_INCLUDE_DIRS}")
+ endif (NOT GLIB2_FIND_QUIETLY)
+ else (GLIB2_FOUND)
+ if (GLIB2_FIND_REQUIRED)
+ message (SEND_ERROR "Could not find GLib2")
+ endif (GLIB2_FIND_REQUIRED)
+ endif (GLIB2_FOUND)
# show the GLIB2_INCLUDE_DIRS and GLIB2_LIBRARIES variables only in the advanced view
- MARK_AS_ADVANCED(GLIB2_INCLUDE_DIRS GLIB2_LIBRARIES)
- MARK_AS_ADVANCED(LIBICONV_INCLUDE_DIR LIBICONV_LIBRARY)
- MARK_AS_ADVANCED(LIBINTL_INCLUDE_DIR LIBINTL_LIBRARY)
+ mark_as_advanced(GLIB2_INCLUDE_DIRS GLIB2_LIBRARIES)
+ mark_as_advanced(LIBICONV_INCLUDE_DIR LIBICONV_LIBRARY)
+ mark_as_advanced(LIBINTL_INCLUDE_DIR LIBINTL_LIBRARY)
-ENDIF (GLIB2_LIBRARIES AND GLIB2_INCLUDE_DIRS)
+endif (GLIB2_LIBRARIES AND GLIB2_INCLUDE_DIRS)
-IF ( WIN32 )
+if ( WIN32 )
# include libiconv for win32
- IF ( NOT LIBICONV_FOUND )
- FIND_PATH(LIBICONV_INCLUDE_DIR iconv.h PATH_SUFFIXES glib-2.0)
-
- FIND_LIBRARY(LIBICONV_LIBRARY NAMES iconv)
-
- IF (LIBICONV_LIBRARY AND LIBICONV_INCLUDE_DIR)
- SET (LIBICONV_FOUND TRUE)
- ENDIF (LIBICONV_LIBRARY AND LIBICONV_INCLUDE_DIR)
- ENDIF ( NOT LIBICONV_FOUND )
- IF (LIBICONV_FOUND)
- SET (GLIB2_LIBRARIES ${GLIB2_LIBRARIES} ${LIBICONV_LIBRARY})
- SET (GLIB2_INCLUDE_DIRS ${GLIB2_INCLUDE_DIRS} ${LIBICONV_INCLUDE_DIR})
- ENDIF (LIBICONV_FOUND)
-ENDIF ( WIN32 )
-
-IF ( GLIB2_FOUND )
+ if ( NOT LIBICONV_FOUND )
+ find_path(LIBICONV_INCLUDE_DIR iconv.h PATH_SUFFIXES glib-2.0)
+
+ find_library(LIBICONV_LIBRARY NAMES iconv)
+
+ if (LIBICONV_LIBRARY AND LIBICONV_INCLUDE_DIR)
+ set (LIBICONV_FOUND TRUE)
+ endif (LIBICONV_LIBRARY AND LIBICONV_INCLUDE_DIR)
+ endif ( NOT LIBICONV_FOUND )
+ if (LIBICONV_FOUND)
+ set (GLIB2_LIBRARIES ${GLIB2_LIBRARIES} ${LIBICONV_LIBRARY})
+ set (GLIB2_INCLUDE_DIRS ${GLIB2_INCLUDE_DIRS} ${LIBICONV_INCLUDE_DIR})
+ endif (LIBICONV_FOUND)
+endif ( WIN32 )
+
+if ( GLIB2_FOUND )
# Check if system has a newer version of glib
# which supports g_regex_match_simple
- INCLUDE( CheckIncludeFiles )
- SET( CMAKE_REQUIRED_INCLUDES ${GLIB2_INCLUDE_DIRS} )
+ include( CheckIncludeFiles )
+ set( CMAKE_REQUIRED_INCLUDES ${GLIB2_INCLUDE_DIRS} )
CHECK_INCLUDE_FILES ( glib/gregex.h HAVE_GLIB_GREGEX_H )
CHECK_INCLUDE_FILES ( glib/gchecksum.h HAVE_GLIB_GCHECKSUM_H )
# Reset CMAKE_REQUIRED_INCLUDES
- SET( CMAKE_REQUIRED_INCLUDES "" )
-ENDIF( GLIB2_FOUND )
+ set( CMAKE_REQUIRED_INCLUDES "" )
+endif( GLIB2_FOUND )
diff --git a/tools/dissectors/cmake/Modules/FindWireshark.cmake b/tools/dissectors/cmake/Modules/FindWireshark.cmake
index 276201245..7c73cf41f 100644
--- a/tools/dissectors/cmake/Modules/FindWireshark.cmake
+++ b/tools/dissectors/cmake/Modules/FindWireshark.cmake
@@ -16,13 +16,13 @@
# wireshark does not install its library with pkg-config information,
# so we need to manually find the libraries and headers
-FIND_PATH( WIRESHARK_INCLUDE_DIRS epan/column.h PATH_SUFFIXES wireshark )
-FIND_LIBRARY( WIRESHARK_LIBRARIES wireshark )
+find_path( WIRESHARK_INCLUDE_DIRS epan/column.h PATH_SUFFIXES wireshark )
+find_library( WIRESHARK_LIBRARIES wireshark )
# Report results
-IF ( WIRESHARK_LIBRARIES AND WIRESHARK_INCLUDE_DIRS )
- SET( WIRESHARK_FOUND 1 )
-ELSE ( WIRESHARK_LIBRARIES AND WIRESHARK_INCLUDE_DIRS )
- MESSAGE( SEND_ERROR "Could NOT find the wireshark library and headers" )
-ENDIF ( WIRESHARK_LIBRARIES AND WIRESHARK_INCLUDE_DIRS )
+if ( WIRESHARK_LIBRARIES AND WIRESHARK_INCLUDE_DIRS )
+ set( WIRESHARK_FOUND 1 )
+else ( WIRESHARK_LIBRARIES AND WIRESHARK_INCLUDE_DIRS )
+ message( SEND_ERROR "Could NOT find the wireshark library and headers" )
+endif ( WIRESHARK_LIBRARIES AND WIRESHARK_INCLUDE_DIRS )