Delete FindTurf.cmake as it was more complicated than necessary.
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules")
# Add turf targets and import its macros since we use them below
-find_package(Turf REQUIRED)
+get_filename_component(outerPath "${CMAKE_CURRENT_LIST_DIR}/.." ABSOLUTE)
+set(TURF_ROOT "${outerPath}/turf" CACHE STRING "Path to Turf")
include("${TURF_ROOT}/cmake/Macros.cmake")
if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
# If this is the root project, apply build settings here so that
+++ /dev/null
-#----------------------------------------------
-# This find module locates the Turf *source*.
-#
-# Later, it might find binary packages too.
-#
-# Sets:
-# TURF_FOUND
-# TURF_ROOT - the root folder, containing CMakeLists.txt
-# TURF_INCLUDE_DIRS - pass to include_directories()
-#----------------------------------------------
-
-if(TURF_ROOT)
- get_filename_component(fullPath "${TURF_ROOT}" ABSOLUTE)
- if(EXISTS "${fullPath}/cmake/turf_config.h.in")
- set(TURF_FOUND TRUE)
- endif()
-else()
- find_path(TURF_ROOT "cmake/turf_config.h.in" PATHS
- "${CMAKE_CURRENT_SOURCE_DIR}/../turf"
- "${CMAKE_SOURCE_DIR}/../turf"
- "${CMAKE_CURRENT_LIST_DIR}/../../../turf")
- if(TURF_ROOT)
- set(TURF_FOUND TRUE)
- endif()
-endif()
-
-if(NOT TURF_FOUND)
- message("Can't find Turf!")
- if(Turf_FIND_REQUIRED)
- message(FATAL_ERROR "Missing required package Turf")
- endif()
-endif()
# Were we included from the root listfile?
if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
# Yes, it's the root.
- list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/../cmake/modules")
- find_package(Turf REQUIRED)
+ get_filename_component(outerPath "${CMAKE_CURRENT_LIST_DIR}/../.." ABSOLUTE)
+ set(TURF_ROOT "${outerPath}/turf" CACHE STRING "Path to Turf")
include("${TURF_ROOT}/cmake/Macros.cmake")
ApplyTurfBuildSettings()
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/.." junction)