1 CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
15 INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
16 INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include)
18 INCLUDE(FindPkgConfig)
19 pkg_check_modules(pkgs REQUIRED glib-2.0
24 FOREACH(flag ${pkgs_CFLAGS})
25 SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
27 #SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -finstrument-functions")
28 SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -pthread")
30 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}")
31 SET(PREFIX ${CMAKE_INSTALL_PREFIX})
32 SET(BINDIR "/usr/bin")
33 SET(EXEC_PREFIX "\${prefix}")
34 SET(INCLUDEDIR "/usr/include")
37 ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"")
38 ADD_DEFINITIONS("-DFACTORYFS=\"$ENV{FACTORYFS}\"")
39 ADD_DEFINITIONS("-DTARGET")
41 ADD_EXECUTABLE(${PROJECT_NAME} ${SRCS})
42 TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${pkgs_LDFLAGS})
44 INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${BINDIR})