summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2021-11-11 22:10:51 -0500
committerEdward Thomson <ethomson@edwardthomson.com>2021-11-14 07:25:41 -0500
commit395b3dc403621f1ab3c400780b057cae91c6f6c1 (patch)
treec012f69c57644e5b6cd39dc8fce78c46b8d2ff19 /examples
parentc3fec45645e6939b3604d2d233be6f97ff629f87 (diff)
downloadlibgit2-395b3dc403621f1ab3c400780b057cae91c6f6c1.tar.gz
cmake: refactor global variables
Update the global variables `LIBGIT2_OBJECTS` to `LIBGIT2_DEPENDENCY_OBJECTS` for clarity and consistency.
Diffstat (limited to 'examples')
-rw-r--r--examples/CMakeLists.txt9
1 files changed, 5 insertions, 4 deletions
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
index a7970a6d0..235e72ada 100644
--- a/examples/CMakeLists.txt
+++ b/examples/CMakeLists.txt
@@ -1,13 +1,14 @@
-include_directories(${LIBGIT2_INCLUDES})
-include_directories(SYSTEM ${LIBGIT2_SYSTEM_INCLUDES})
+file(GLOB SRC_EXAMPLES *.c *.h)
-file(GLOB LG2_SOURCES *.c *.h)
-add_executable(lg2 ${LG2_SOURCES})
+add_executable(lg2 ${SRC_EXAMPLES})
set_target_properties(lg2 PROPERTIES C_STANDARD 90)
# Ensure that we do not use deprecated functions internally
add_definitions(-DGIT_DEPRECATE_HARD)
+target_include_directories(lg2 PRIVATE ${LIBGIT2_INCLUDES} ${LIBGIT2_DEPENDENCY_INCLUDES})
+target_include_directories(lg2 SYSTEM PRIVATE ${LIBGIT2_SYSTEM_INCLUDES})
+
if(WIN32 OR ANDROID)
target_link_libraries(lg2 git2)
else()