To improve readability.
Also add more comments on why each is necessary.
Closes #17630
#
# $(top_srcdir)/include is for libcurl's external include files
# $(top_builddir)/lib is for libcurl's generated lib/curl_config.h file
+# $(srcdir) for the generated unity source to find included sources
AM_CPPFLAGS = -I$(top_srcdir)/include \
-I$(top_builddir)/lib \
endif()
set_property(DIRECTORY APPEND PROPERTY INCLUDE_DIRECTORIES
- "${PROJECT_BINARY_DIR}/lib" # for "curl_config.h"
- "${PROJECT_SOURCE_DIR}/lib" # for "curl_setup.h"
+ "${PROJECT_BINARY_DIR}/lib" # for "curl_config.h"
+ "${PROJECT_SOURCE_DIR}/lib" # for "curl_setup.h"
"${PROJECT_SOURCE_DIR}/lib/curlx" # for curlx functions
- # This is needed as tool_hugehelp.c is generated in the binary dir
- "${PROJECT_SOURCE_DIR}/src" # for "tool_hugehelp.h"
+ "${CMAKE_CURRENT_SOURCE_DIR}" # for "tool_hugehelp.c"
)
add_executable(${EXE_NAME} ${CURL_CFILES} ${_curl_cfiles_gen} ${CURLX_CFILES} ${CURL_HFILES} ${_curl_hfiles_gen})
# $(top_builddir)/lib is for libcurl's generated lib/curl_config.h file
# $(top_builddir)/src is for curl's generated src/curl_config.h file
# $(top_srcdir)/lib for libcurl's lib/curl_setup.h and other "borrowed" files
-# $(top_srcdir)/src is for curl's src/tool_setup.h and "curl-private" files
+# $(srcdir) for generated sources to find included sources
AM_CPPFLAGS = -I$(top_srcdir)/include \
-I$(top_builddir)/lib \
-I$(top_builddir)/src \
-I$(top_srcdir)/lib \
-I$(top_srcdir)/lib/curlx \
- -I$(top_srcdir)/src
+ -I$(srcdir)
bin_PROGRAMS = curl
"${PROJECT_BINARY_DIR}/lib" # for "curl_config.h"
"${PROJECT_SOURCE_DIR}/lib" # for "curl_setup.h"
"${PROJECT_SOURCE_DIR}/lib/curlx" # for curlx
- "${CMAKE_CURRENT_SOURCE_DIR}" # for "first.h"
+ "${CMAKE_CURRENT_SOURCE_DIR}" # for the generated bundle source to find included test sources
)
set_property(TARGET ${BUNDLE} APPEND PROPERTY COMPILE_DEFINITIONS "CURL_NO_OLDIES")
set_target_properties(${BUNDLE} PROPERTIES OUTPUT_NAME "${BUNDLE}" PROJECT_LABEL "Test ${BUNDLE}" UNITY_BUILD OFF)
# $(top_srcdir)/include is for libcurl's external include files
# $(top_builddir)/lib is for libcurl's generated lib/curl_config.h file
# $(top_srcdir)/lib for libcurl's lib/curl_setup.h and other "borrowed" files
+# $(srcdir) for the generated bundle source to find included test sources
AM_CPPFLAGS = -I$(top_srcdir)/include \
-I$(top_builddir)/lib \
"${PROJECT_SOURCE_DIR}/lib" # for "curl_setup.h"
"${PROJECT_SOURCE_DIR}/lib/curlx" # for curlx
"${PROJECT_SOURCE_DIR}/src" # for "tool_binmode.h"
- "${PROJECT_SOURCE_DIR}/tests/libtest" # to be able to build generated tests
- "${PROJECT_SOURCE_DIR}/tests/unit" # for curlcheck.h
+ "${CMAKE_CURRENT_SOURCE_DIR}" # for the generated bundle source to find included test sources
+ "${PROJECT_SOURCE_DIR}/tests/unit" # for "curlcheck.h"
)
set_property(TARGET ${BUNDLE} APPEND PROPERTY COMPILE_DEFINITIONS "${CURL_DEBUG_MACROS}")
set_property(TARGET ${BUNDLE} APPEND PROPERTY COMPILE_DEFINITIONS "CURL_NO_OLDIES" "CURL_DISABLE_DEPRECATION")
# $(top_srcdir)/include is for libcurl's external include files
# $(top_builddir)/lib is for libcurl's generated lib/curl_config.h file
# $(top_srcdir)/lib for libcurl's lib/curl_setup.h and other "borrowed" files
+# $(srcdir) for the generated bundle source to find included test sources
AM_CPPFLAGS = -I$(top_srcdir)/include \
-I$(top_builddir)/lib \
-I$(top_srcdir)/lib \
-I$(top_srcdir)/lib/curlx \
-I$(top_srcdir)/src \
- -I$(top_srcdir)/tests/libtest \
+ -I$(srcdir) \
-I$(top_srcdir)/tests/unit
# Get BUNDLE, BUNDLE_SRC, FIRSTFILES, UTILS, CURLX_SRCS, TESTFILES variables
add_dependencies(testdeps ${BUNDLE})
target_link_libraries(${BUNDLE} ${CURL_LIBS})
target_include_directories(${BUNDLE} PRIVATE
- "${PROJECT_BINARY_DIR}/lib" # for "curl_config.h"
- "${PROJECT_SOURCE_DIR}/lib" # for "curl_setup.h"
- "${PROJECT_SOURCE_DIR}/lib/curlx" # for curlx
- "${PROJECT_SOURCE_DIR}/src" # for "tool_binmode.h", "tool_xattr.h"
- "${PROJECT_SOURCE_DIR}/tests/server" # for "first.h"
+ "${PROJECT_BINARY_DIR}/lib" # for "curl_config.h"
+ "${PROJECT_SOURCE_DIR}/lib" # for "curl_setup.h"
+ "${PROJECT_SOURCE_DIR}/lib/curlx" # for curlx
+ "${PROJECT_SOURCE_DIR}/src" # for "tool_binmode.h", "tool_xattr.h"
+ "${CMAKE_CURRENT_SOURCE_DIR}" # for the generated bundle source to find included test sources
)
set_property(TARGET ${BUNDLE} APPEND PROPERTY COMPILE_DEFINITIONS "WITHOUT_LIBCURL")
set_property(TARGET ${BUNDLE} APPEND PROPERTY COMPILE_DEFINITIONS "CURL_NO_OLDIES")
# $(top_builddir)/lib is for libcurl's generated lib/curl_config.h file
# $(top_srcdir)/lib for libcurl's lib/curl_setup.h and other "borrowed" files
# $(top_srcdir)/src for "tool_binmode.h", "tool_xattr.h"
+# $(srcdir) for the generated bundle source to find included test sources
AM_CPPFLAGS = -I$(top_srcdir)/include \
-I$(top_builddir)/lib \
-I$(top_srcdir)/lib \
-I$(top_srcdir)/lib/curlx \
-I$(top_srcdir)/src \
- -I$(top_srcdir)/tests/server
+ -I$(srcdir)
# Get BUNDLE, BUNDLE_SRC, FIRSTFILES, UTILS, CURLX_SRCS, TESTFILES variables
include Makefile.inc
"${PROJECT_BINARY_DIR}/lib" # for "curl_config.h"
"${PROJECT_SOURCE_DIR}/lib" # for "curl_setup.h"
"${PROJECT_SOURCE_DIR}/lib/curlx" # for curlx
- "${PROJECT_SOURCE_DIR}/src"
- "${PROJECT_SOURCE_DIR}/tests/libtest"
- "${PROJECT_SOURCE_DIR}/tests/unit" # for curlcheck.h
- "${PROJECT_SOURCE_DIR}/tests/tunit"
+ "${PROJECT_SOURCE_DIR}/src" # for tool headers
+ "${PROJECT_SOURCE_DIR}/tests/libtest" # for "first.h"
+ "${PROJECT_SOURCE_DIR}/tests/unit" # for "curlcheck.h"
+ "${CMAKE_CURRENT_SOURCE_DIR}" # for the generated bundle source to find included test sources
)
set_property(TARGET ${BUNDLE} APPEND PROPERTY COMPILE_DEFINITIONS "${CURL_DEBUG_MACROS}")
set_property(TARGET ${BUNDLE} APPEND PROPERTY COMPILE_DEFINITIONS "CURL_NO_OLDIES" "CURL_DISABLE_DEPRECATION")
# $(top_srcdir)/include is for libcurl's external include files
# $(top_builddir)/lib is for libcurl's generated lib/curl_config.h file
# $(top_srcdir)/lib for libcurl's lib/curl_setup.h and other "borrowed" files
+# $(srcdir) for the generated bundle source to find included test sources
AM_CPPFLAGS = -I$(top_srcdir)/include \
-I$(top_builddir)/lib \
-I$(top_srcdir)/src \
-I$(top_srcdir)/tests/libtest \
-I$(top_srcdir)/tests/unit \
- -I$(top_srcdir)/tests/tunit
+ -I$(srcdir)
# Get BUNDLE, BUNDLE_SRC, FIRSTFILES, UTILS, TESTFILES variables
include Makefile.inc
"${PROJECT_BINARY_DIR}/lib" # for "curl_config.h"
"${PROJECT_SOURCE_DIR}/lib" # for "curl_setup.h"
"${PROJECT_SOURCE_DIR}/lib/curlx" # for curlx
- "${PROJECT_SOURCE_DIR}/src"
- "${PROJECT_SOURCE_DIR}/tests/libtest"
- "${PROJECT_SOURCE_DIR}/tests/unit"
+ "${PROJECT_SOURCE_DIR}/src" # for "tool_binmode.h"
+ "${PROJECT_SOURCE_DIR}/tests/libtest" # for "first.h"
+ "${CMAKE_CURRENT_SOURCE_DIR}" # for the generated bundle source to find included test sources
)
set_property(TARGET ${BUNDLE} APPEND PROPERTY COMPILE_DEFINITIONS "${CURL_DEBUG_MACROS}")
set_property(TARGET ${BUNDLE} APPEND PROPERTY COMPILE_DEFINITIONS "CURL_NO_OLDIES" "CURL_DISABLE_DEPRECATION")
# $(top_srcdir)/include is for libcurl's external include files
# $(top_builddir)/lib is for libcurl's generated lib/curl_config.h file
# $(top_srcdir)/lib for libcurl's lib/curl_setup.h and other "borrowed" files
+# $(srcdir) for the generated bundle source to find included test sources
AM_CPPFLAGS = -I$(top_srcdir)/include \
-I$(top_builddir)/lib \
-I$(top_srcdir)/lib/curlx \
-I$(top_srcdir)/src \
-I$(top_srcdir)/tests/libtest \
- -I$(top_srcdir)/tests/unit
+ -I$(srcdir)
# Get BUNDLE, BUNDLE_SRC, FIRSTFILES, UTILS, TESTFILES variables
include Makefile.inc