mirror of
https://github.com/TREX-CoE/trexio.git
synced 2025-01-03 10:06:01 +01:00
[WIP] FindTREXIO.cmake file
This commit is contained in:
parent
f03812d2b4
commit
320697ee8d
45
tools/FindTREXIO.cmake
Normal file
45
tools/FindTREXIO.cmake
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
|
||||||
|
|
||||||
|
#===========================================
|
||||||
|
|
||||||
|
# This file should be located WITHIN your project source tree.
|
||||||
|
# (e.g. in cmake/FindTREXIO.cmake file)
|
||||||
|
|
||||||
|
# usage in CMakeLists.txt
|
||||||
|
#list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}")
|
||||||
|
#find_package(TREXIO)
|
||||||
|
#include_directories("${TREXIO_INCLUDE_DIR}")
|
||||||
|
#target_link_libraries(your_target ${TREXIO_LIBRARY})
|
||||||
|
|
||||||
|
#===========================================
|
||||||
|
|
||||||
|
# If already in cache, be silent
|
||||||
|
if (TREXIO_INCLUDE_DIR AND TREXIO_LIBRARY)
|
||||||
|
set(TREXIO_FIND_QUIETLY TRUE)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(TREXIO_FOUND OFF)
|
||||||
|
set(TREXIO_LIBRARY)
|
||||||
|
|
||||||
|
set(TREXIO_NAMES "libtrexio.so")
|
||||||
|
#set(TREXIO_NAMES "libtrexio.so" "libtrexio.dylib" "libtrexio.la")
|
||||||
|
|
||||||
|
find_path(TREXIO_INCLUDE_DIR
|
||||||
|
NAMES trexio.h
|
||||||
|
HINTS /usr/include
|
||||||
|
/usr/local/include
|
||||||
|
$ENV{HOME}/include)
|
||||||
|
|
||||||
|
find_library(TREXIO_LIBRARY
|
||||||
|
NAMES ${TREXIO_NAMES}
|
||||||
|
PATHS /usr/lib
|
||||||
|
/usr/local/lib
|
||||||
|
$ENV{HOME}/lib
|
||||||
|
NO_DEFAULT_PATH)
|
||||||
|
|
||||||
|
|
||||||
|
# Handle the QUIETLY and REQUIRED arguments and set TREXIO_FOUND to TRUE if
|
||||||
|
# all listed variables are TRUE.
|
||||||
|
INCLUDE(FindPackageHandleStandardArgs)
|
||||||
|
FIND_PACKAGE_HANDLE_STANDARD_ARGS(TREXIO DEFAULT_MSG TREXIO_LIBRARY TREXIO_INCLUDE_DIR )
|
||||||
|
MARK_AS_ADVANCED(TREXIO_INCLUDE_DIR TREXIO_LIBRARY)
|
Loading…
Reference in New Issue
Block a user