summaryrefslogtreecommitdiff
path: root/CMake/options.cmake
diff options
context:
space:
mode:
authorAlbrecht Schlosser <albrechts.fltk@online.de>2018-01-10 20:49:03 +0000
committerAlbrecht Schlosser <albrechts.fltk@online.de>2018-01-10 20:49:03 +0000
commit7aef0cad39e55e6fb18917cf80ddb7aa433b1180 (patch)
tree682ab60af955d291104d03a0c4f4d89934c5b6b8 /CMake/options.cmake
parentb47dc05909a5c00ef34847c3550b82eebaaad749 (diff)
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
Diffstat (limited to 'CMake/options.cmake')
-rw-r--r--CMake/options.cmake10
1 files changed, 5 insertions, 5 deletions
diff --git a/CMake/options.cmake b/CMake/options.cmake
index 60e9fc0e0..187e1e67e 100644
--- a/CMake/options.cmake
+++ b/CMake/options.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
@@ -282,8 +282,8 @@ if(OPTION_USE_SYSTEM_ZLIB AND ZLIB_FOUND)
else()
add_subdirectory(zlib)
set(FLTK_ZLIB_LIBRARIES fltk_z)
- set(ZLIB_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/zlib)
- include_directories(${CMAKE_SOURCE_DIR}/zlib)
+ set(ZLIB_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/zlib)
+ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/zlib)
set(FLTK_BUILTIN_ZLIB_FOUND TRUE)
endif(OPTION_USE_SYSTEM_ZLIB AND ZLIB_FOUND)
@@ -307,7 +307,7 @@ if(OPTION_USE_SYSTEM_LIBJPEG AND JPEG_FOUND)
else()
add_subdirectory(jpeg)
set(FLTK_JPEG_LIBRARIES fltk_jpeg)
- include_directories(${CMAKE_SOURCE_DIR}/jpeg)
+ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/jpeg)
set(FLTK_BUILTIN_JPEG_FOUND TRUE)
endif(OPTION_USE_SYSTEM_LIBJPEG AND JPEG_FOUND)
@@ -335,7 +335,7 @@ else()
set(HAVE_PNG_H 1)
set(HAVE_PNG_GET_VALID 1)
set(HAVE_PNG_SET_TRNS_TO_ALPHA 1)
- include_directories(${CMAKE_SOURCE_DIR}/png)
+ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/png)
set(FLTK_BUILTIN_PNG_FOUND TRUE)
endif(OPTION_USE_SYSTEM_LIBPNG AND PNG_FOUND)