forked from nodegui/nodegui-plugin-animation
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
37 lines (31 loc) · 1.29 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
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}")
# -------------- User Config ---------------
set(PLUGIN_ADDON_NAME "nodegui_plugin_animation")
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/QPropertyAnimation/qpropertyanimation_wrap.cpp"
"${PROJECT_SOURCE_DIR}/src/cpp/QPropertyAnimation/npropertyanimation.hpp"
"${PROJECT_SOURCE_DIR}/src/cpp/QVariantAnimation/qvariantanimation_wrap.cpp"
"${PROJECT_SOURCE_DIR}/src/cpp/QVariantAnimation/nvariantanimation.hpp"
)
AddPluginConfig(${PLUGIN_ADDON_NAME})
target_include_directories(${PLUGIN_ADDON_NAME} PRIVATE
"${CMAKE_JS_INC}"
"${PROJECT_SOURCE_DIR}"
"${PROJECT_SOURCE_DIR}/src/cpp"
)
target_link_libraries(${PLUGIN_ADDON_NAME} PRIVATE
"${CMAKE_JS_LIB}"
Qt5::Widgets
Qt5::Gui
)