Moved target properties

This commit is contained in:
Kylart 2019-11-07 13:58:30 +01:00
parent cf605bd433
commit 8ce6a6030d
1 changed files with 4 additions and 4 deletions

View File

@ -32,10 +32,6 @@ list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/lib/libtorrent/cmake/M
# you should add this line in every CMake.js based project.
include_directories(${CMAKE_JS_INC})
if (MSVC)
set_target_properties(${PROJECT_NAME} PROPERTIES LINK_FLAGS "/DELAYLOAD:node.exe" )
endif (MSVC)
# Build a shared library named after the project from the files in `src/`
file(
GLOB
@ -75,6 +71,10 @@ target_include_directories(${PROJECT_NAME} PRIVATE ${NODE_ADDON_API_DIR})
# Gives our library file a .node extension without any "lib" prefix
set_target_properties(${PROJECT_NAME} PROPERTIES PREFIX "" SUFFIX ".node")
if (MSVC)
set_target_properties(${PROJECT_NAME} PROPERTIES LINK_FLAGS "/DELAYLOAD:node.exe" )
endif (MSVC)
# Essential include files to build a node addon,
# You should add this line in every CMake.js based project
target_include_directories(${PROJECT_NAME} PRIVATE ${CMAKE_JS_INC})