Clean up the configs a bit more
This commit is contained in:
+4
-7
@@ -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)
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user