1 CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
4 SET(PREFIX ${CMAKE_INSTALL_PREFIX})
5 SET(EXEC_PREFIX "${PREFIX}")
6 SET(LIBDIR "${LIB_INSTALL_DIR}")
7 SET(INCLUDEDIR "${PREFIX}/include")
10 SET(PREFIX ${CMAKE_INSTALL_PREFIX})
11 SET(EXEC_PREFIX "${PREFIX}")
12 SET(LIBDIR "${LIB_INSTALL_DIR}/voice/tts/1.0/engine")
13 SET(INCLUDEDIR "${PREFIX}/include")
52 INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR})
53 INCLUDE_DIRECTORIES(${INCLUDEDIR})
54 INCLUDE_DIRECTORIES("${CMAKE_SOURCE_DIR}/../common")
56 FOREACH(flag ${pkgs_CFLAGS})
57 SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
60 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}")
61 SET(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}")
62 SET(CMAKE_C_FLAGS_DEBUG "-O0 -g")
63 SET(CMAKE_C_FLAGS_RELEASE "-O2")
64 SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed")
67 ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"")
68 ADD_DEFINITIONS("-DVENDOR=\"${VENDOR}\"")
69 ADD_DEFINITIONS("-DPACKAGE=\"${PACKAGE}\"")
70 ADD_DEFINITIONS("-DPACKAGE_NAME=\"${PKGNAME}\"")
71 ADD_DEFINITIONS("-DPREFIX=\"${PREFIX}\"")
72 ADD_DEFINITIONS("-DLOCALEDIR=\"${LOCALEDIR}\"")
73 ADD_DEFINITIONS("-DEDJDIR=\"${EDJDIR}\"")
74 ADD_DEFINITIONS("-DIMAGEDIR=\"${IMAGEDIR}\"")
77 ADD_EXECUTABLE(${PROJECT_NAME} ${SRCS})
78 TARGET_LINK_LIBRARIES(${PROJECT_NAME} -ldl ${pkgs_LDFLAGS})
80 ADD_EXECUTABLE("${PROJECT_NAME}-noti" ${NOTI_SRCS})
81 TARGET_LINK_LIBRARIES("${PROJECT_NAME}-noti" -ldl ${pkgs_LDFLAGS})
83 ADD_EXECUTABLE("${PROJECT_NAME}-sr" ${SR_SRCS})
84 TARGET_LINK_LIBRARIES("${PROJECT_NAME}-sr" -ldl ${pkgs_LDFLAGS})
88 INSTALL(TARGETS ${PROJECT_NAME} DESTINATION bin)
89 INSTALL(TARGETS "${PROJECT_NAME}-noti" DESTINATION bin)
90 INSTALL(TARGETS "${PROJECT_NAME}-sr" DESTINATION bin)
92 INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/ttsp.h DESTINATION include)
93 INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/ttsd.conf DESTINATION lib${LIB_SUFFIX}/voice/tts/1.0)