diff options
Diffstat (limited to 'CMake/setup.cmake')
| -rw-r--r-- | CMake/setup.cmake | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/CMake/setup.cmake b/CMake/setup.cmake index a31016dff..fd70d44d8 100644 --- a/CMake/setup.cmake +++ b/CMake/setup.cmake @@ -4,7 +4,7 @@ # 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 @@ -28,16 +28,20 @@ set(FLTK_VERSION_PATCH "0") set(FLTK_VERSION "${FLTK_VERSION_MAJOR}.${FLTK_VERSION_MINOR}") set(FLTK_VERSION_FULL "${FLTK_VERSION}.${FLTK_VERSION_PATCH}") -set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin) -set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/lib) -set(ARCHIVE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/lib) +set(EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR}/bin) +set(LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR}/lib) +set(ARCHIVE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR}/lib) # Search for modules in the FLTK source dir first -set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/CMake") +set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMake") -set(FLTK_INCLUDE_DIRS ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR}) +set(FLTK_INCLUDE_DIRS ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}) include_directories(${FLTK_INCLUDE_DIRS}) +# Remember root of FLTK source directory in case we're in a subdirectory. +# Used for instance to find the source directory for doxygen docs +set(FLTK_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}) + # Setup install locations if(CMAKE_VERSION VERSION_GREATER 2.8.4) # Use GNUInstallDirs if available. |
