File tree Expand file tree Collapse file tree 2 files changed +17
-5
lines changed
Expand file tree Collapse file tree 2 files changed +17
-5
lines changed Original file line number Diff line number Diff line change @@ -8,10 +8,22 @@ target_compile_definitions(Core PRIVATE "-DPLUGIN_NAME=\"${PLUGIN_PREFIX}Core\""
88target_link_libraries (Core NWNXLib)
99
1010if (MSVC )
11- set_target_properties (Core PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS TRUE )
12- set_target_properties (Core PROPERTIES BUILD_SHARED_LIBS TRUE )
13- set_target_properties (Core PROPERTIES ENABLE_EXPORTS TRUE )
14- target_link_libraries (Core ${CMAKE_CURRENT_SOURCE_DIR} /nwserver.lib)
11+ file (DOWNLOAD https://nwn.beamdog.net/downloads/nwnee-dedicated-8193.35-40.zip nwserver.zip)
12+ file (ARCHIVE_EXTRACT INPUT nwserver.zip DESTINATION "." PATTERNS "bin/win32/nwserver.exe" )
13+
14+ add_custom_command (
15+ OUTPUT "${CMAKE_CURRENT_BINARY_DIR} /nwserver.lib"
16+ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR} /create_lib.bat
17+ COMMAND ${CMAKE_CURRENT_SOURCE_DIR} /create_lib.bat ARGS "bin/win32/nwserver.exe"
18+ )
19+
20+ add_custom_target (NWServerLib DEPENDS "${CMAKE_CURRENT_BINARY_DIR} /nwserver.lib" )
21+
22+ add_dependencies (Core NWServerLib)
23+ set_target_properties (Core PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS TRUE )
24+ set_target_properties (Core PROPERTIES BUILD_SHARED_LIBS TRUE )
25+ set_target_properties (Core PROPERTIES ENABLE_EXPORTS TRUE )
26+ target_link_libraries (Core "${CMAKE_CURRENT_BINARY_DIR} /nwserver.lib" )
1527endif ()
1628
1729# The name defined here will be ignored when loading plugins.
Original file line number Diff line number Diff line change 11@ echo off
22
3- dumpbin /exports nwserver.exe > nwserver.exports
3+ dumpbin /exports %1 > nwserver.exports
44
55echo LIBRARY nwserver.exe > nwserver.def
66echo EXPORTS >> nwserver.def
You can’t perform that action at this time.
0 commit comments