]> git.ipfire.org Git - thirdparty/xz.git/commitdiff
CMake: Add /lib to include path.
authorJia Tan <jiat0218@gmail.com>
Mon, 25 Sep 2023 16:09:53 +0000 (00:09 +0800)
committerJia Tan <jiat0218@gmail.com>
Mon, 25 Sep 2023 16:09:53 +0000 (00:09 +0800)
CMakeLists.txt

index 4c361d48415563f3ddcb349cf8da04406e2d1a5b..f91d277263a113dc91be22915af73bf5be5eb0e4 100644 (file)
@@ -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()