From 7aef0cad39e55e6fb18917cf80ddb7aa433b1180 Mon Sep 17 00:00:00 2001 From: Albrecht Schlosser Date: Wed, 10 Jan 2018 20:49:03 +0000 Subject: CMake: enable building FLTK in a subdirectory of another project. Basically replace CMAKE_XXX_DIR with CMAKE_CURRENT_XXX_DIR where XXX = SOURCE or BINARY. Patch proposal by cleanrock, FLTK PR #4: https://github.com/fltk/test-only/pull/4 Patch modified to fix target dirs for test programs and doxygen docs. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12630 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- CMake/resources.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'CMake/resources.cmake') diff --git a/CMake/resources.cmake b/CMake/resources.cmake index fb2308bd6..71fc9c4c3 100644 --- a/CMake/resources.cmake +++ b/CMake/resources.cmake @@ -4,7 +4,7 @@ # Main CMakeLists.txt to build the FLTK project using CMake (www.cmake.org) # Written by Michael Surette # -# Copyright 1998-2017 by Bill Spitzak and others. +# Copyright 1998-2018 by Bill Spitzak and others. # # This library is free software. Distribution and use rights are outlined in # the file "COPYING" which should have been included with this file. If this @@ -187,8 +187,8 @@ if(HAVE_SCANDIR AND NOT HAVE_SCANDIR_POSIX) set(MSG "POSIX compatible scandir") message(STATUS "Looking for ${MSG}") try_compile(V - ${CMAKE_BINARY_DIR} - ${CMAKE_SOURCE_DIR}/CMake/posixScandir.cxx + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/CMake/posixScandir.cxx ) if(V) message(STATUS "${MSG} - found") -- cgit v1.2.3