From bb84af042e05c1891d658be21e8e801bc4107b32 Mon Sep 17 00:00:00 2001
From: Peter Jansson <github-peter@users.noreply.github.com>
Date: Sat, 17 Mar 2018 10:36:00 -0700
Subject: [PATCH] top level --> current level
Processing current source and binary directory location instead of the top level source/binary location, useful for including the library directly as a sub-directory in other projects.
CMAKE_SOURCE_DIR --> CMAKE_CURRENT_SOURCE_DIR
CMAKE_BINARY_DIR --> CMAKE_CURRENT_BINARY_DIR
---
CMakeLists.txt | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 354ca75..c183a33 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -149,16 +149,16 @@ endif (NOT ZLIB_FOUND)
# create hpdf_config.h
configure_file(
- ${CMAKE_SOURCE_DIR}/include/hpdf_config.h.cmake
- ${CMAKE_BINARY_DIR}/include/hpdf_config.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/include/hpdf_config.h.cmake
+ ${CMAKE_CURRENT_BINARY_DIR}/include/hpdf_config.h
)
include_directories(${CMAKE_BINARY_DIR}/include)
# create DevPackage file
if(DEVPAK)
configure_file(
- ${CMAKE_SOURCE_DIR}/libharu.DevPackage.cmake
- ${CMAKE_BINARY_DIR}/libharu.DevPackage
+ ${CMAKE_CURRENT_SOURCE_DIR}/libharu.DevPackage.cmake
+ ${CMAKE_CURRENT_BINARY_DIR}/libharu.DevPackage
)
endif(DEVPAK)
# =======================================================================
--
2.21.1 (Apple Git-122.3)