Skip to content

Commit 96984c3

Browse files
committed
cmake: add missing define to routing build for msvc
1 parent 36f9afe commit 96984c3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

ortools/routing/CMakeLists.txt

+4
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ add_library(${NAME} OBJECT ${_SRCS})
2020
set_target_properties(${NAME} PROPERTIES
2121
POSITION_INDEPENDENT_CODE ON
2222
)
23+
if(MSVC AND BUILD_SHARED_LIBS)
24+
target_compile_definitions(${NAME} PUBLIC "OR_BUILD_DLL")
25+
target_compile_definitions(${NAME} PRIVATE "OR_EXPORT")
26+
endif()
2327
target_include_directories(${NAME} PRIVATE
2428
${PROJECT_SOURCE_DIR}
2529
${PROJECT_BINARY_DIR})

0 commit comments

Comments
 (0)