summaryrefslogtreecommitdiffstats
path: root/Tests/ExternalProjectSourceSubdirNotCMake/CMakeLists.txt
blob: 43e6efbd83dabc29a66e6cfdb75c1828a31ab83b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
cmake_minimum_required(VERSION 3.10)
project(ExternalProjectSourceSubdirNotCMake NONE)
include(ExternalProject)

find_program(MAKE_EXECUTABLE
  NAMES gmake make)

if (NOT MAKE_EXECUTABLE)
  message("No `make` executable found; skipping")
  return ()
endif ()

ExternalProject_Add(Example
  SOURCE_SUBDIR subdir
  BUILD_IN_SOURCE 1
  SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/Example
  CONFIGURE_COMMAND ""
  BUILD_COMMAND "${MAKE_EXECUTABLE}"
  INSTALL_COMMAND ""
  )