From e9030e49a38eed2016d2c495854d17469858f264 Mon Sep 17 00:00:00 2001
From: mickey mouse <mickey.mouse-1985@libero.it>
Date: Thu, 6 Feb 2014 19:11:23 +0100
Subject: [PATCH] Changed some variables in order to allow user to build
libharu as a subproject through add_subdirectory() command.
---
CMakeLists.txt | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 354ca75..9111c5c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -110,7 +110,7 @@ endif(PNG_FOUND)
if(MSVC_VERSION GREATER 1399)
add_definitions(-D_CRT_SECURE_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE)
endif(MSVC_VERSION GREATER 1399)
-include_directories(${CMAKE_SOURCE_DIR}/include)
+include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include)
# these are options
@@ -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)
+include_directories(${CMAKE_CURRENT_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)
# =======================================================================
@@ -203,7 +203,7 @@ set(
include/hpdf_pdfa.h
include/hpdf_3dmeasure.h
include/hpdf_exdata.h
- ${CMAKE_BINARY_DIR}/include/hpdf_config.h
+ ${CMAKE_CURRENT_BINARY_DIR}/include/hpdf_config.h
)
# install header files
@@ -215,7 +215,7 @@ if(NOT DEVPAK)
install(DIRECTORY if DESTINATION .)
endif(NOT DEVPAK)
if(DEVPAK)
- install(FILES ${CMAKE_BINARY_DIR}/libharu.DevPackage DESTINATION .)
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libharu.DevPackage DESTINATION .)
endif(DEVPAK)
# =======================================================================
--
2.21.1 (Apple Git-122.3)