xespeak CmakeLists.txt
来源:互联网 发布:手机淘宝怎么交电费 编辑:程序博客网 时间:2024/05/19 17:23
if (UNIX)
message("The system is ${CMAKE_SYSTEM}")
message("The system name is ${CMAKE_SYSTEM_NAME}")
message("The system version is ${CMAKE_SYSTEM_VERSION}")
message("The system processor is ${CMAKE_SYSTEM_PROCESSOR}")
endif()
message("The cmake version is ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}-${CMAKE_PATCH_VERSION}")
message("The compiler is ${CMAKE_C_COMPILER}.")
message("PROJECT_SOURCE_DIR is ${PROJECT_SOURCE_DIR}")
message("CMAKE_CURRENT_SOURCE_DIR is ${CMAKE_CURRENT_SOURCE_DIR}")
message("CMAKE_SOURCE_DIR is ${CMAKE_SOURCE_DIR}")
project(xespeak)
cmake_minimum_required(VERSION 2.8)
set(COM_SRC_LIST compiledict.cpp
dictionary.cpp
intonation.cpp
klatt.h
klatt.cpp
numbers.cpp
phoneme.h
phonemelist.cpp
readclause.cpp
setlengths.cpp
sonic.h
sonic.cpp
synth_mbrola.cpp
synthdata.cpp
synthesize.h
synthesize.cpp
tr_languages.cpp
translate.h
translate.cpp
voice.h
voices.cpp
wavegen.cpp
portaudio.h
sintab.h
speak_lib.h)
if(WIN32)
message("The operation platform is windows")
if(MSVC)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SAFESEH:NO")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /SAFESEH:NO")
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} /SAFESEH:NO")
endif()
if(PLATFORM_WINDOWS_DLL)
message("Now to make windows dll...")
#add_subdirectory(./os/win32/cmd)
#add_definitions(-DPLATFORM_WINDOWS)
include_directories(./os/win32/dll/)
#aux_source_directory(. SRC_LIST)
set(SRC_LIST ./os/win32/dll/speech.h
./os/win32/dll/stdint.h
./os/win32/dll/StdAfx.h
speak_lib.cpp
${COM_SRC_LIST})
#add_library(${PROJECT_NAME} STATIC ${SRC_LIST})
add_library(PAStaticWMME STATIC IMPORTED)
set_target_properties(PAStaticWMME PROPERTIES
IMPORTED_LOCATION_RELEASE ./os/win32/deps/PAStaticWMME.lib
IMPORTED_LOCATION_DEBUG ./os/win32/deps/PAStaticWMME.lib
IMPORTED_LINK_INTERFACE_LIBRARIES PAStaticWMME)
add_library(${PROJECT_NAME} SHARED ${SRC_LIST})
target_link_libraries(${PROJECT_NAME} ${CMAKE_CURRENT_SOURCE_DIR}/os/win32/deps/PAStaticWMME.lib)
elseif(PLATFORM_WINDOWS_CMD)
message("Now to make windows cmd...")
#add_subdirectory(./os/win32/cmd)
#aux_source_directory(. SRC_LIST)
add_definitions(/DWIN32 /DNDEBUG /D_CONSOLE)
include_directories(./os/win32/cmd/)
set(SRC_LIST ./os/win32/cmd/speech.h
./os/win32/cmd/stdint.h
./os/win32/cmd/StdAfx.h
speak.cpp
${COM_SRC_LIST})
add_library(PAStaticWMME STATIC IMPORTED)
set_target_properties(PAStaticWMME PROPERTIES
IMPORTED_LOCATION_RELEASE ./os/win32/deps/PAStaticWMME.lib
IMPORTED_LOCATION_DEBUG ./os/win32/deps/PAStaticWMME.lib
IMPORTED_LINK_INTERFACE_LIBRARIES PAStaticWMME)
add_executable(${PROJECT_NAME} ${SRC_LIST})
target_link_libraries(${PROJECT_NAME}
${CMAKE_CURRENT_SOURCE_DIR}/os/win32/deps/PAStaticWMME.lib
Winmm.lib)
endif()
elseif(UNIX)
message("The operation platform is Linux")
endif()
message("The system is ${CMAKE_SYSTEM}")
message("The system name is ${CMAKE_SYSTEM_NAME}")
message("The system version is ${CMAKE_SYSTEM_VERSION}")
message("The system processor is ${CMAKE_SYSTEM_PROCESSOR}")
endif()
message("The cmake version is ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}-${CMAKE_PATCH_VERSION}")
message("The compiler is ${CMAKE_C_COMPILER}.")
message("PROJECT_SOURCE_DIR is ${PROJECT_SOURCE_DIR}")
message("CMAKE_CURRENT_SOURCE_DIR is ${CMAKE_CURRENT_SOURCE_DIR}")
message("CMAKE_SOURCE_DIR is ${CMAKE_SOURCE_DIR}")
project(xespeak)
cmake_minimum_required(VERSION 2.8)
set(COM_SRC_LIST compiledict.cpp
dictionary.cpp
intonation.cpp
klatt.h
klatt.cpp
numbers.cpp
phoneme.h
phonemelist.cpp
readclause.cpp
setlengths.cpp
sonic.h
sonic.cpp
synth_mbrola.cpp
synthdata.cpp
synthesize.h
synthesize.cpp
tr_languages.cpp
translate.h
translate.cpp
voice.h
voices.cpp
wavegen.cpp
portaudio.h
sintab.h
speak_lib.h)
if(WIN32)
message("The operation platform is windows")
if(MSVC)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SAFESEH:NO")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /SAFESEH:NO")
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} /SAFESEH:NO")
endif()
if(PLATFORM_WINDOWS_DLL)
message("Now to make windows dll...")
#add_subdirectory(./os/win32/cmd)
#add_definitions(-DPLATFORM_WINDOWS)
include_directories(./os/win32/dll/)
#aux_source_directory(. SRC_LIST)
set(SRC_LIST ./os/win32/dll/speech.h
./os/win32/dll/stdint.h
./os/win32/dll/StdAfx.h
speak_lib.cpp
${COM_SRC_LIST})
#add_library(${PROJECT_NAME} STATIC ${SRC_LIST})
add_library(PAStaticWMME STATIC IMPORTED)
set_target_properties(PAStaticWMME PROPERTIES
IMPORTED_LOCATION_RELEASE ./os/win32/deps/PAStaticWMME.lib
IMPORTED_LOCATION_DEBUG ./os/win32/deps/PAStaticWMME.lib
IMPORTED_LINK_INTERFACE_LIBRARIES PAStaticWMME)
add_library(${PROJECT_NAME} SHARED ${SRC_LIST})
target_link_libraries(${PROJECT_NAME} ${CMAKE_CURRENT_SOURCE_DIR}/os/win32/deps/PAStaticWMME.lib)
elseif(PLATFORM_WINDOWS_CMD)
message("Now to make windows cmd...")
#add_subdirectory(./os/win32/cmd)
#aux_source_directory(. SRC_LIST)
add_definitions(/DWIN32 /DNDEBUG /D_CONSOLE)
include_directories(./os/win32/cmd/)
set(SRC_LIST ./os/win32/cmd/speech.h
./os/win32/cmd/stdint.h
./os/win32/cmd/StdAfx.h
speak.cpp
${COM_SRC_LIST})
add_library(PAStaticWMME STATIC IMPORTED)
set_target_properties(PAStaticWMME PROPERTIES
IMPORTED_LOCATION_RELEASE ./os/win32/deps/PAStaticWMME.lib
IMPORTED_LOCATION_DEBUG ./os/win32/deps/PAStaticWMME.lib
IMPORTED_LINK_INTERFACE_LIBRARIES PAStaticWMME)
add_executable(${PROJECT_NAME} ${SRC_LIST})
target_link_libraries(${PROJECT_NAME}
${CMAKE_CURRENT_SOURCE_DIR}/os/win32/deps/PAStaticWMME.lib
Winmm.lib)
endif()
elseif(UNIX)
message("The operation platform is Linux")
endif()
0 0
- xespeak CmakeLists.txt
- CMakelists.txt
- CMakeLists.txt
- CMakeLists.txt
- CMakeLists.txt
- CMakeLists.txt
- CMakeLists.txt的写法
- CMakeLists.txt文件写法
- CMakeLists.txt的写法
- CMakeLists.txt 编写
- ROS中的CMakeLists.txt
- CMakeLists.txt的写法
- CMake Intro - CMakeLists.txt
- ROS中的CMakeLists.txt
- CMakeLists.txt 实例
- CMakeLists.txt杂记
- CmakeLists.txt protobuf编译
- CMakeLists.txt的写法
- git and github
- ARM-Linux驱动--MTD驱动分析(三)
- 一种Neutron部署拓扑 (by quqi99)
- 机器学习库函数 numpy-MKL-1.8.0.win-amd64-py2.7.exe 64位库函数下载
- hdu 5135 Little Zu Chongzhi's Triangles 2014ACM/ICPC亚洲区广州站-重现赛
- xespeak CmakeLists.txt
- JSP实现分页功能
- 频域处理 之 高通滤波与绘图
- 学习OpenCV范例(二十)——角点检测算法
- ConcurrentHashMap
- 泛型与EnumMap使用例子
- Android蓝牙开发的一些经验
- vba批量将一个文件夹内的多个同格式的工作薄中的数据合并
- Oracle自增列创建方法