Clean up the configs a bit more

This commit is contained in:
Atul R
2019-09-22 15:19:37 +02:00
parent 99e7799dae
commit f5e290beec
3 changed files with 14 additions and 26 deletions
+4 -7
View File
@@ -3,15 +3,13 @@ set(PLUGIN_CMAKE_DIR "${CMAKE_CURRENT_LIST_DIR}")
set(NODEGUI_ROOT "${PLUGIN_CMAKE_DIR}/..")
set(NODEGUI_LIBRARY "${NODEGUI_ROOT}/build/Release/nodegui_core.node")
include("${PLUGIN_CMAKE_DIR}/common.cmake")
include("${PLUGIN_CMAKE_DIR}/qt.cmake")
include("${PLUGIN_CMAKE_DIR}/napi.cmake")
function(AddPluginConfig addonName)
# common
include("${PLUGIN_CMAKE_DIR}/common.cmake")
AddCommonConfig(${addonName})
# qt
include("${PLUGIN_CMAKE_DIR}/qt.cmake")
AddQtSupport(${addonName})
# napi
include("${PLUGIN_CMAKE_DIR}/napi.cmake")
AddNapiSupport(${addonName})
target_link_libraries(${addonName} PRIVATE
@@ -27,6 +25,5 @@ function(AddPluginConfig addonName)
"${NODEGUI_ROOT}/src/cpp/include/nodegui"
)
endfunction(AddPluginConfig addonName)
+6
View File
@@ -1,4 +1,10 @@
# Adds Qt support
# make sure you include this at the top of whichever Cmakelist file you are going to use.
# Need for automatic moc. Moc executable path is set in qt.cmake
set(CMAKE_AUTOMOC ON)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(QT_VERSION_MAJOR 5)
add_executable(Qt5::moc IMPORTED)
function(AddQtSupport addonName)
execute_process(COMMAND node -p "require('@nodegui/qode').qtHome"