Skip to content

Commit 86d8681

Browse files
committed
change interface cmakelists
1 parent 41c46d7 commit 86d8681

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

src/interface/CMakeLists.txt

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,20 @@ target_link_libraries( ${lib} nlohmann_json::nlohmann_json )
2323
target_link_libraries( ${lib} svzero_algebra_library)
2424
target_link_libraries( ${lib} svzero_model_library)
2525
target_link_libraries( ${lib} svzero_solve_library)
26+
27+
# Put the built library in:
28+
set(_iface_outdir "${CMAKE_BINARY_DIR}/src/interface")
29+
set_target_properties(${lib} PROPERTIES
30+
RUNTIME_OUTPUT_DIRECTORY "${_iface_outdir}" # .dll on Windows
31+
LIBRARY_OUTPUT_DIRECTORY "${_iface_outdir}" # .so/.dylib on Linux/macOS
32+
ARCHIVE_OUTPUT_DIRECTORY "${_iface_outdir}" # import/static .lib/.a
33+
OUTPUT_NAME "svzero_interface" # basename stays consistent
34+
)
35+
36+
# Add the 'lib' prefix
37+
if (WIN32)
38+
set_target_properties(${lib} PROPERTIES
39+
PREFIX "lib"
40+
WINDOWS_EXPORT_ALL_SYMBOLS ON
41+
)
42+
endif()

0 commit comments

Comments
 (0)