aboutsummaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake')
-rw-r--r--cmake/FindLibLUV.cmake6
-rw-r--r--cmake/FindLibTermkey.cmake6
-rw-r--r--cmake/FindLibUV.cmake9
-rw-r--r--cmake/FindLibVterm.cmake33
-rw-r--r--cmake/FindLuaJit.cmake7
-rw-r--r--cmake/FindMsgpack.cmake7
6 files changed, 3 insertions, 65 deletions
diff --git a/cmake/FindLibLUV.cmake b/cmake/FindLibLUV.cmake
index 66f827214e..784e3fd249 100644
--- a/cmake/FindLibLUV.cmake
+++ b/cmake/FindLibLUV.cmake
@@ -14,12 +14,6 @@ set(LIBLUV_DEFINITIONS ${PC_LIBLUV_CFLAGS_OTHER})
find_path(LIBLUV_INCLUDE_DIR luv/luv.h
PATHS ${PC_LIBLUV_INCLUDEDIR} ${PC_LIBLUV_INCLUDE_DIRS})
-# If we're asked to use static linkage, add libluv.a as a preferred library name.
-if(LIBLUV_USE_STATIC)
- list(APPEND LIBLUV_NAMES
- "${CMAKE_STATIC_LIBRARY_PREFIX}luv${CMAKE_STATIC_LIBRARY_SUFFIX}")
-endif()
-
list(APPEND LIBLUV_NAMES luv)
find_library(LIBLUV_LIBRARY NAMES ${LIBLUV_NAMES}
diff --git a/cmake/FindLibTermkey.cmake b/cmake/FindLibTermkey.cmake
index 6e09a692c8..3e0c7f1bfd 100644
--- a/cmake/FindLibTermkey.cmake
+++ b/cmake/FindLibTermkey.cmake
@@ -14,12 +14,6 @@ set(LIBTERMKEY_DEFINITIONS ${PC_LIBTERMKEY_CFLAGS_OTHER})
find_path(LIBTERMKEY_INCLUDE_DIR termkey.h
PATHS ${PC_LIBTERMKEY_INCLUDEDIR} ${PC_LIBTERMKEY_INCLUDE_DIRS})
-# If we're asked to use static linkage, add libuv.a as a preferred library name.
-if(LIBTERMKEY_USE_STATIC)
- list(APPEND LIBTERMKEY_NAMES
- "${CMAKE_STATIC_LIBRARY_PREFIX}termkey${CMAKE_STATIC_LIBRARY_SUFFIX}")
-endif()
-
list(APPEND LIBTERMKEY_NAMES termkey)
find_library(LIBTERMKEY_LIBRARY NAMES ${LIBTERMKEY_NAMES}
diff --git a/cmake/FindLibUV.cmake b/cmake/FindLibUV.cmake
index e94a243ec6..951fb0435e 100644
--- a/cmake/FindLibUV.cmake
+++ b/cmake/FindLibUV.cmake
@@ -4,9 +4,6 @@
# LIBUV_FOUND - system has libuv
# LIBUV_INCLUDE_DIRS - the libuv include directories
# LIBUV_LIBRARIES - link these to use libuv
-#
-# Set the LIBUV_USE_STATIC variable to specify if static libraries should
-# be preferred to shared ones.
find_package(PkgConfig)
if (PKG_CONFIG_FOUND)
@@ -16,12 +13,6 @@ endif()
find_path(LIBUV_INCLUDE_DIR uv.h
HINTS ${PC_LIBUV_INCLUDEDIR} ${PC_LIBUV_INCLUDE_DIRS})
-# If we're asked to use static linkage, add libuv.a as a preferred library name.
-if(LIBUV_USE_STATIC)
- list(APPEND LIBUV_NAMES
- "${CMAKE_STATIC_LIBRARY_PREFIX}uv${CMAKE_STATIC_LIBRARY_SUFFIX}")
-endif(LIBUV_USE_STATIC)
-
list(APPEND LIBUV_NAMES uv)
find_library(LIBUV_LIBRARY NAMES ${LIBUV_NAMES}
diff --git a/cmake/FindLibVterm.cmake b/cmake/FindLibVterm.cmake
index e11d1caddc..469494ddfd 100644
--- a/cmake/FindLibVterm.cmake
+++ b/cmake/FindLibVterm.cmake
@@ -4,34 +4,7 @@
# LIBVTERM_INCLUDE_DIRS - The libvterm include directories
# LIBVTERM_LIBRARIES - The libraries needed to use libvterm
-find_package(PkgConfig)
-if (PKG_CONFIG_FOUND)
- pkg_check_modules(PC_LIBVTERM QUIET vterm)
-endif()
+include(LibFindMacros)
-set(LIBVTERM_DEFINITIONS ${PC_LIBVTERM_CFLAGS_OTHER})
-
-find_path(LIBVTERM_INCLUDE_DIR vterm.h
- PATHS ${PC_LIBVTERM_INCLUDEDIR} ${PC_LIBVTERM_INCLUDE_DIRS})
-
-# If we're asked to use static linkage, add libuv.a as a preferred library name.
-if(LIBVTERM_USE_STATIC)
- list(APPEND LIBVTERM_NAMES
- "${CMAKE_STATIC_LIBRARY_PREFIX}vterm${CMAKE_STATIC_LIBRARY_SUFFIX}")
-endif()
-
-list(APPEND LIBVTERM_NAMES vterm)
-
-find_library(LIBVTERM_LIBRARY NAMES ${LIBVTERM_NAMES}
- HINTS ${PC_LIBVTERM_LIBDIR} ${PC_LIBVTERM_LIBRARY_DIRS})
-
-set(LIBVTERM_LIBRARIES ${LIBVTERM_LIBRARY})
-set(LIBVTERM_INCLUDE_DIRS ${LIBVTERM_INCLUDE_DIR})
-
-include(FindPackageHandleStandardArgs)
-# handle the QUIETLY and REQUIRED arguments and set LIBVTERM_FOUND to TRUE
-# if all listed variables are TRUE
-find_package_handle_standard_args(LibVterm DEFAULT_MSG
- LIBVTERM_LIBRARY LIBVTERM_INCLUDE_DIR)
-
-mark_as_advanced(LIBVTERM_INCLUDE_DIR LIBVTERM_LIBRARY)
+libfind_pkg_detect(LIBVTERM vterm FIND_PATH vterm.h FIND_LIBRARY vterm)
+libfind_process(LIBVTERM REQUIRED)
diff --git a/cmake/FindLuaJit.cmake b/cmake/FindLuaJit.cmake
index d60b6f09be..72795afefd 100644
--- a/cmake/FindLuaJit.cmake
+++ b/cmake/FindLuaJit.cmake
@@ -15,13 +15,6 @@ find_path(LUAJIT_INCLUDE_DIR luajit.h
PATHS ${PC_LUAJIT_INCLUDEDIR} ${PC_LUAJIT_INCLUDE_DIRS}
PATH_SUFFIXES luajit-2.0 luajit-2.1)
-# If we're asked to use static linkage, add libluajit-5.1.a as a preferred
-# library name.
-if(LUAJIT_USE_STATIC)
- list(APPEND LUAJIT_NAMES
- "${CMAKE_STATIC_LIBRARY_PREFIX}luajit-5.1${CMAKE_STATIC_LIBRARY_SUFFIX}")
-endif()
-
if(MSVC)
list(APPEND LUAJIT_NAMES lua51)
elseif(MINGW)
diff --git a/cmake/FindMsgpack.cmake b/cmake/FindMsgpack.cmake
index df4efa9c41..26eb19d498 100644
--- a/cmake/FindMsgpack.cmake
+++ b/cmake/FindMsgpack.cmake
@@ -26,13 +26,6 @@ else()
set(MSGPACK_VERSION_STRING)
endif()
-# If we're asked to use static linkage, add libmsgpack{,c}.a as a preferred library name.
-if(MSGPACK_USE_STATIC)
- list(APPEND MSGPACK_NAMES
- "${CMAKE_STATIC_LIBRARY_PREFIX}msgpackc${CMAKE_STATIC_LIBRARY_SUFFIX}"
- "${CMAKE_STATIC_LIBRARY_PREFIX}msgpack${CMAKE_STATIC_LIBRARY_SUFFIX}")
-endif()
-
if(MSVC)
# The import library for the msgpack DLL has a different name
list(APPEND MSGPACK_NAMES msgpackc_import)