Fix qode shared library in windows

0.15.2
This commit is contained in:
master-atul
2020-03-07 11:08:14 +01:00
parent efdbb3e6c7
commit 110cb80e82
4 changed files with 28 additions and 5 deletions
+24
View 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)