diff options
| author | Edward Thomson <ethomson@edwardthomson.com> | 2021-11-11 22:10:51 -0500 |
|---|---|---|
| committer | Edward Thomson <ethomson@edwardthomson.com> | 2021-11-14 07:25:41 -0500 |
| commit | 395b3dc403621f1ab3c400780b057cae91c6f6c1 (patch) | |
| tree | c012f69c57644e5b6cd39dc8fce78c46b8d2ff19 /examples | |
| parent | c3fec45645e6939b3604d2d233be6f97ff629f87 (diff) | |
| download | libgit2-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.txt | 9 |
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() |
