Skip to content

Commit f9bb1dd

Browse files
committed
Change WINDOWS_EXPORT_ALL_SYMBOLS location to try to fix Windows build error.
1 parent c3217cc commit f9bb1dd

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

cmake/CompilerSettings.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ endif()
2727
# Platform-specific settings
2828
if(WIN32)
2929
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
30-
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
30+
3131
set(LSL_WINVER "0x0601" CACHE STRING
3232
"Windows version (_WIN32_WINNT) to target (defaults to 0x0601 for Windows 7)")
3333
elseif(APPLE)

cmake/TargetObjLib.cmake

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,12 @@ target_compile_definitions(lslobj
1515
$<$<CXX_COMPILER_ID:MSVC>:LSLNOAUTOLINK> # don't use #pragma(lib) in CMake builds
1616
)
1717
if(WIN32)
18-
# TODO: Maybe these can be moved above with boolean conditionals?
18+
if(BUILD_SHARED_LIBS)
19+
set_target_properties(lslobj
20+
PROPERTIES
21+
WINDOWS_EXPORT_ALL_SYMBOLS ON
22+
)
23+
endif(BUILD_SHARED_LIBS)
1924
target_compile_definitions(lslobj
2025
PRIVATE
2126
_CRT_SECURE_NO_WARNINGS

0 commit comments

Comments
 (0)