2 CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
5 pkg_check_modules(pkgs REQUIRED
18 FOREACH(flag ${pkgs_CFLAGS})
19 SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
22 SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -Wall -Werror -Winline -g")
23 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}")
25 SET(PKGROOT "/opt/usr/apps/live.viewer")
26 ADD_DEFINITIONS("-DNDEBUG")
27 ADD_DEFINITIONS("-DPKGROOT=\"${PKGROOT}\"")
28 #ADD_DEFINITIONS("-DFLOG")
29 ADD_DEFINITIONS("-DLOG_TAG=\"${PROJECT_NAME}\"")
30 ADD_DEFINITIONS(${pkgs_CFLAGS})
31 ADD_DEFINITIONS(${pkgs_LDFLAGS})
33 INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include)
35 ADD_EXECUTABLE(${PROJECT_NAME}
44 TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${pkgs_LDFLAGS})
45 INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${PKGROOT}/bin)
46 INSTALL(FILES ${CMAKE_SOURCE_DIR}/live.viewer.xml DESTINATION /opt/share/packages)