File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -23,3 +23,20 @@ target_link_libraries( ${lib} nlohmann_json::nlohmann_json )
2323target_link_libraries ( ${lib} svzero_algebra_library )
2424target_link_libraries ( ${lib} svzero_model_library )
2525target_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 ()
You can’t perform that action at this time.
0 commit comments