Newer
Older
# Find headers and libraries
FIND_PATH(
TURTLE_INCLUDE_DIR
HINTS
$ENV{TURTLE_INCLUDE_DIR}
${TURTLE_INCLUDE_DIR}
external_dependencies/turtle
PATHS
/usr
include
)
# Set TURTLE_FOUND honoring the QUIET and REQUIRED arguments
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(
turtle
"Turtle was NOT found!"
TURTLE_INCLUDE_DIR)
# Output variables
IF(TURTLE_FOUND)
# Include dirs
SET(TURTLE_INCLUDE_DIRS ${TURTLE_INCLUDE_DIR})
ELSE()
MESSAGE(FATAL_ERROR "Set, please, the environmental variable TURTLE_INCLUDE_DIR to the folder, where 'mock.hpp' is located...")
ENDIF(TURTLE_FOUND)
# Add path only to the 'include' folder
set(TMP "")
string(REPLACE "/include/turtle" "/include" TMP ${TURTLE_INCLUDE_DIR})
list(APPEND TURTLE_INCLUDE_DIR ${TMP})
# Advanced options for not cluttering the cmake UIs:
MARK_AS_ADVANCED(TURTLE_INCLUDE_DIR)