Skip to content

Commit f3638c9

Browse files
committed
fix editable with msvc
1 parent c54eeab commit f3638c9

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

symengine/lib/CMakeLists.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,18 @@ if (CMAKE_CXX_COMPILER_ID MATCHES GNU|Clang)
7777
)
7878
endif()
7979

80+
if("${CMAKE_CURRENT_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_BINARY_DIR}"
81+
AND DEFINED SKBUILD)
82+
# Editable in-place builds. THe empty generator expression ensures
83+
# multi-config enerators keeps us from having to set
84+
# LIBRARY_OUTPUT_DIRECTORY_<CONFIG> too.
85+
set_target_properties(
86+
symengine_wrapper
87+
PROPERTIES
88+
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}$<0:>"
89+
)
90+
endif()
91+
8092
install(
8193
TARGETS
8294
symengine_wrapper

0 commit comments

Comments
 (0)