Fix qode shared library in windows
0.15.2
This commit is contained in:
parent
efdbb3e6c7
commit
110cb80e82
@ -3,6 +3,7 @@ cmake_minimum_required(VERSION 3.1)
|
||||
include(./config/common.cmake)
|
||||
include(./config/qt.cmake)
|
||||
include(./config/napi.cmake)
|
||||
include(./config/qode.cmake)
|
||||
|
||||
# ---------------------------------------
|
||||
|
||||
@ -162,6 +163,7 @@ add_library(${CORE_WIDGETS_ADDON} SHARED
|
||||
AddCommonConfig(${CORE_WIDGETS_ADDON})
|
||||
AddQtSupport(${CORE_WIDGETS_ADDON})
|
||||
AddNapiSupport(${CORE_WIDGETS_ADDON})
|
||||
AddQodeSupport(${CORE_WIDGETS_ADDON})
|
||||
|
||||
target_include_directories(${CORE_WIDGETS_ADDON} PRIVATE
|
||||
"${CMAKE_JS_INC}"
|
||||
@ -177,9 +179,6 @@ if (WIN32)
|
||||
target_compile_definitions(${CORE_WIDGETS_ADDON} PRIVATE
|
||||
ENABLE_DLL_EXPORT=1
|
||||
)
|
||||
target_link_libraries(${CORE_WIDGETS_ADDON} PRIVATE
|
||||
"${PROJECT_SOURCE_DIR}/node_modules/@nodegui/qode/binaries/qode.lib"
|
||||
)
|
||||
target_compile_options(${CORE_WIDGETS_ADDON} PRIVATE "/MP4")
|
||||
|
||||
endif()
|
||||
|
||||
24
config/qode.cmake
Normal file
24
config/qode.cmake
Normal file
@ -0,0 +1,24 @@
|
||||
# Adds Qode shared binary support
|
||||
|
||||
set(QODE_CONFIG_FILE @nodegui/qode/src/config.js)
|
||||
|
||||
macro(AddQodeSupport addonName)
|
||||
if (WIN32)
|
||||
|
||||
execute_process(COMMAND node -p "require('${QODE_CONFIG_FILE}').extractDir"
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
OUTPUT_VARIABLE QODE_BINARY_DIR
|
||||
)
|
||||
|
||||
string(REPLACE "\n" "" QODE_BINARY_DIR "${QODE_BINARY_DIR}")
|
||||
string(REPLACE "\"" "" QODE_BINARY_DIR "${QODE_BINARY_DIR}")
|
||||
|
||||
message(STATUS "Using Qode installation for ${addonName} QODE_BINARY_DIR:${QODE_BINARY_DIR}")
|
||||
|
||||
target_link_libraries(${CORE_WIDGETS_ADDON} PRIVATE
|
||||
"${QODE_BINARY_DIR}\\qode.lib"
|
||||
)
|
||||
|
||||
endif()
|
||||
|
||||
endmacro(AddQodeSupport addonName)
|
||||
2
package-lock.json
generated
2
package-lock.json
generated
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nodegui/nodegui",
|
||||
"version": "0.15.1",
|
||||
"version": "0.15.2",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nodegui/nodegui",
|
||||
"version": "0.15.1",
|
||||
"version": "0.15.2",
|
||||
"description": "A cross platform library to build native desktop apps.",
|
||||
"main": "dist/index.js",
|
||||
"typings": "dist/index.d.ts",
|
||||
|
||||
Loading…
Reference in New Issue
Block a user