aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorJia Tan <jiat0218@gmail.com>2023-09-26 00:09:53 +0800
committerJia Tan <jiat0218@gmail.com>2023-09-26 00:09:53 +0800
commit84808b68f1075e8603a8ef95d361a61fdc6a5b10 (patch)
tree7c14f75f354cfbca0141c3e42a3bcce3b56b472e /CMakeLists.txt
parentCMake: Update libgnu target with new header files. (diff)
downloadxz-84808b68f1075e8603a8ef95d361a61fdc6a5b10.tar.xz
CMake: Add /lib to include path.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt5
1 files changed, 5 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4c361d48..f91d2772 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1002,6 +1002,10 @@ target_sources(libgnu PRIVATE lib/getopt.in.h)
file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/lib")
target_include_directories(libgnu PUBLIC "${CMAKE_CURRENT_BINARY_DIR}/lib")
+# Include /lib from the source directory. It does no harm even if none of
+# the Gnulib replacements are used.
+target_include_directories(libgnu PUBLIC lib)
+
# The command line tools need getopt_long in order to parse arguments. If
# the system does not have a getopt_long implementation we can use the one
# from Gnulib instead.
@@ -1036,6 +1040,7 @@ if(NOT HAVE_GETOPT_LONG)
lib/getopt-pfx-ext.h
"${CMAKE_CURRENT_BINARY_DIR}/lib/getopt.h"
)
+
endif()