Blame examples/CMakeLists.txt

Packit Service 20376f
FILE(GLOB_RECURSE SRC_EXAMPLE_GIT2 network/*.c network/*.h)
Packit Service 20376f
ADD_EXECUTABLE(cgit2 ${SRC_EXAMPLE_GIT2})
Packit Service 20376f
IF(WIN32 OR ANDROID)
Packit Service 20376f
	TARGET_LINK_LIBRARIES(cgit2 git2)
Packit Service 20376f
ELSE()
Packit Service 20376f
	TARGET_LINK_LIBRARIES(cgit2 git2 pthread)
Packit Service 20376f
ENDIF()
Packit Service 20376f
Packit Service 20376f
FILE(GLOB SRC_EXAMPLE_APPS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.c)
Packit Service 20376f
FOREACH(src_app ${SRC_EXAMPLE_APPS})
Packit Service 20376f
	STRING(REPLACE ".c" "" app_name ${src_app})
Packit Service 20376f
	IF(NOT ${app_name} STREQUAL "common")
Packit Service 20376f
		ADD_EXECUTABLE(${app_name} ${src_app} "common.c")
Packit Service 20376f
		TARGET_LINK_LIBRARIES(${app_name} git2)
Packit Service 20376f
	ENDIF()
Packit Service 20376f
ENDFOREACH()