mirror of
https://github.com/nextcloud/desktop.git
synced 2024-12-18 03:41:50 +03:00
CMake Modules: Simplify FindNeon.cmake.
This commit is contained in:
parent
668d7be259
commit
628151e997
1 changed files with 24 additions and 43 deletions
|
@ -14,52 +14,33 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
if (NEON_LIBRARIES AND NEON_INCLUDE_DIRS)
|
find_package(PkgConfig)
|
||||||
# in cache already
|
if (PKG_CONFIG_FOUND)
|
||||||
set(NEON_FOUND TRUE)
|
|
||||||
else (NEON_LIBRARIES AND NEON_INCLUDE_DIRS)
|
|
||||||
find_package(PkgConfig)
|
|
||||||
if (PKG_CONFIG_FOUND)
|
|
||||||
pkg_check_modules(_NEON neon)
|
pkg_check_modules(_NEON neon)
|
||||||
endif (PKG_CONFIG_FOUND)
|
endif (PKG_CONFIG_FOUND)
|
||||||
|
|
||||||
find_path(NEON_INCLUDE_DIR
|
include(GNUInstallDirs)
|
||||||
NAMES
|
|
||||||
neon/ne_basic.h
|
|
||||||
PATHS
|
|
||||||
${_NEON_INCLUDEDIR}
|
|
||||||
/usr/include
|
|
||||||
/usr/local/include
|
|
||||||
/opt/local/include
|
|
||||||
/sw/include
|
|
||||||
)
|
|
||||||
|
|
||||||
find_library(NEON_LIBRARY
|
find_path(NEON_INCLUDE_DIRS
|
||||||
NAMES
|
NAMES
|
||||||
neon
|
neon/ne_basic.h
|
||||||
PATHS
|
HINTS
|
||||||
${_NEON_LIBDIR}
|
${_NEON_INCLUDEDIR}
|
||||||
/usr/lib
|
${CMAKE_INSTALL_INCLUDEDIR}
|
||||||
/usr/local/lib
|
)
|
||||||
/opt/local/lib
|
|
||||||
/sw/lib
|
|
||||||
)
|
|
||||||
|
|
||||||
set(NEON_INCLUDE_DIRS
|
find_library(NEON_LIBRARIES
|
||||||
${NEON_INCLUDE_DIR}
|
NAMES
|
||||||
)
|
neon
|
||||||
|
HINTS
|
||||||
|
${_NEON_LIBDIR}
|
||||||
|
${CMAKE_INSTALL_LIBDIR}
|
||||||
|
${CMAKE_INSTALL_PREFIX}/lib
|
||||||
|
${CMAKE_INSTALL_PREFIX}/lib64
|
||||||
|
)
|
||||||
|
|
||||||
if (NEON_LIBRARY)
|
include(FindPackageHandleStandardArgs)
|
||||||
set(NEON_LIBRARIES
|
find_package_handle_standard_args(Neon DEFAULT_MSG NEON_LIBRARIES NEON_INCLUDE_DIRS)
|
||||||
${NEON_LIBRARIES}
|
|
||||||
${NEON_LIBRARY}
|
|
||||||
)
|
|
||||||
endif (NEON_LIBRARY)
|
|
||||||
|
|
||||||
include(FindPackageHandleStandardArgs)
|
# show the NEON_INCLUDE_DIRS and NEON_LIBRARIES variables only in the advanced view
|
||||||
find_package_handle_standard_args(Neon DEFAULT_MSG NEON_LIBRARIES NEON_INCLUDE_DIRS)
|
mark_as_advanced(NEON_INCLUDE_DIRS NEON_LIBRARIES)
|
||||||
|
|
||||||
# show the NEON_INCLUDE_DIRS and NEON_LIBRARIES variables only in the advanced view
|
|
||||||
mark_as_advanced(NEON_INCLUDE_DIRS NEON_LIBRARIES)
|
|
||||||
|
|
||||||
endif (NEON_LIBRARIES AND NEON_INCLUDE_DIRS)
|
|
||||||
|
|
Loading…
Reference in a new issue