Cleanup cmake find modules

This commit is contained in:
Jared Szechy
2018-07-01 09:51:03 -04:00
parent 5f8aedb864
commit 98f9e36291
5 changed files with 51 additions and 69 deletions

View File

@@ -1,20 +1,15 @@
# Find ITPP
# - Try to find ITPP
# Once done this will define
#
# ITPP_FOUND - System has ITPP
# ITPP_INCLUDE_DIR - The ITPP include directory
# ITPP_LIBRARY - The library needed to use ITPP
#
FIND_PATH(ITPP_INCLUDE_DIR itpp/itcomm.h)
find_path(ITPP_INCLUDE_DIR itpp/itcomm.h)
SET(ITPP_NAMES ${ITPP_NAMES} itpp libitpp libitpp.dll)
FIND_LIBRARY(ITPP_LIBRARY NAMES ${ITPP_NAMES} PATH)
set(ITPP_NAMES ${ITPP_NAMES} itpp libitpp libitpp.dll)
FIND_LIBRARY(ITPP_LIBRARY NAMES ${ITPP_NAMES})
IF (ITPP_INCLUDE_DIR AND ITPP_LIBRARY)
SET(ITPP_FOUND TRUE)
ENDIF (ITPP_INCLUDE_DIR AND ITPP_LIBRARY)
IF (ITPP_FOUND)
IF (NOT ITPP_FIND_QUIETLY)
MESSAGE (STATUS "Found ITPP: ${ITPP_LIBRARY}")
ENDIF (NOT ITPP_FIND_QUIETLY)
ELSE (ITPP_FOUND_FOUND)
IF (ITPP_FIND_REQUIRED)
MESSAGE (FATAL_ERROR "Could not find ITPP")
ENDIF (ITPP_FIND_REQUIRED)
ENDIF (ITPP_FOUND)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(ITPP DEFAULT_MSG ITPP_LIBRARY ITPP_INCLUDE_DIR)