forked from ran-j/qtexttospeech
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
40 lines (33 loc) · 1.25 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
cmake_minimum_required(VERSION 3.1)
# -------------- Plugin Config ---------------
execute_process(COMMAND node -p "require('@nodegui/nodegui/plugin').CMAKE_HELPER_FILE"
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
OUTPUT_VARIABLE NODEGUI_PLUGIN_CMAKE_HELPER
)
string(REPLACE "\n" "" NODEGUI_PLUGIN_CMAKE_HELPER ${NODEGUI_PLUGIN_CMAKE_HELPER})
string(REPLACE "\"" "" NODEGUI_PLUGIN_CMAKE_HELPER ${NODEGUI_PLUGIN_CMAKE_HELPER})
include("${NODEGUI_PLUGIN_CMAKE_HELPER}")
include(./config/init.cmake)
# -------------- User Config ---------------
set(PLUGIN_ADDON_NAME "nodegui_plugin_text_to_speech")
project(${PLUGIN_ADDON_NAME})
add_library(${PLUGIN_ADDON_NAME} SHARED
"${CMAKE_JS_SRC}"
"${PROJECT_SOURCE_DIR}/src/cpp/main.cpp"
"${PROJECT_SOURCE_DIR}/src/cpp/QTextToSpeech/qtexttospeech_wrap.h"
"${PROJECT_SOURCE_DIR}/src/cpp/QTextToSpeech/qtexttospeech_wrap.cpp"
"${PROJECT_SOURCE_DIR}/src/cpp/QTextToSpeech/nqtexttospeech.hpp"
)
AddQtTTS(${PLUGIN_ADDON_NAME})
AddPluginConfig(${PLUGIN_ADDON_NAME})
target_include_directories(${PLUGIN_ADDON_NAME} PRIVATE
"${CMAKE_JS_INC}"
"${PROJECT_SOURCE_DIR}"
)
target_link_libraries(${PLUGIN_ADDON_NAME} PRIVATE
"${CMAKE_JS_LIB}"
Qt5::TextToSpeech
Qt5::Core
Qt5::Widgets
Qt5::Gui
)