]> granicus.if.org Git - libexpat/commitdiff
cmake: use the current binary directory
authorBen Boeckel <ben.boeckel@kitware.com>
Wed, 2 Nov 2016 12:11:07 +0000 (08:11 -0400)
committerBen Boeckel <ben.boeckel@kitware.com>
Wed, 5 Jul 2017 21:13:57 +0000 (17:13 -0400)
This is not necessarily the top-level CMake directory (such as when
expat is included inside of another project's source tree directly), so
we should instead use the one relative to this `CMakeLists.txt` file.

expat/CMakeLists.txt

index d2d93c3771b497baaae07c841cf9556e914a4cad..679290d659ad47b00d815700534d5157b01bac50 100644 (file)
@@ -45,7 +45,7 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${EXTRA_LINK_AND_COMPILE_FLAGS}")
 set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${EXTRA_LINK_AND_COMPILE_FLAGS}")\r
 set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${EXTRA_LINK_AND_COMPILE_FLAGS}")\r
 \r
-include_directories(${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR}/lib)\r
+include_directories(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/lib)\r
 if(MSVC)\r
     add_definitions(-D_CRT_SECURE_NO_WARNINGS -wd4996)\r
 endif(MSVC)\r