# # hello/CMakeLists.txt -- # cmake_minimum_required(VERSION 2.6) project(HELLO C) add_executable(hello-stdio hello-stdio.c) add_executable(hello-write hello-write.c) #set_property(TARGET hello-write APPEND PROPERTY LINK_FLAGS "-static") add_executable(hello-writev hello-writev.c) add_executable(hello-syscall hello-syscall.c) add_executable(hello-atexit hello-atexit.c) INCLUDE(FindPkgConfig) pkg_check_modules(GLIB2 glib-2.0) add_definitions(${GLIB2_CFLAGS}) add_executable(hello-glib hello-glib.c) target_link_libraries(hello-glib ${GLIB2_LDFLAGS}) add_executable(hello-glib-event hello-glib-event.c) target_link_libraries(hello-glib-event ${GLIB2_LDFLAGS}) add_executable(hello-glib-threads hello-glib-event.c) target_link_libraries(hello-glib-threads ${GLIB2_LDFLAGS}) if(CMAKE_COMPILER_IS_GNUCC) add_definitions(--std=c99 -Wall) endif()