Copy ngspice codemodels for MSVC

This commit is contained in:
Marek Roszko 2022-08-08 21:57:44 -04:00
parent 8fd524aec1
commit 09da6f32dc
3 changed files with 15 additions and 1 deletions

View File

@ -1,7 +1,7 @@
# CMake script for finding libngspice # CMake script for finding libngspice
# Copyright (C) 2016 CERN # Copyright (C) 2016 CERN
# Copyright (C) 2020 Kicad Developers, see AUTHORS.txt for contributors. # Copyright (C) 2022 Kicad Developers, see AUTHORS.txt for contributors.
# #
# Author: Maciej Suminski <maciej.suminski@cern.ch> # Author: Maciej Suminski <maciej.suminski@cern.ch>
# #
@ -133,6 +133,12 @@ elseif( WIN32 AND MSVC )
bin bin
lib lib
) )
find_path(NGSPICE_CM_DIR
NAMES analog.cm digital.cm spice2poly.cm
PATH_SUFFIXES
lib/ngspice
)
else() else()
set( NGSPICE_DLL "${NGSPICE_LIBRARY}" ) set( NGSPICE_DLL "${NGSPICE_LIBRARY}" )
endif() endif()

View File

@ -480,6 +480,10 @@ if( KICAD_SPICE )
add_custom_command( TARGET eeschema_kiface POST_BUILD add_custom_command( TARGET eeschema_kiface POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different "${NGSPICE_DLL}" "$<TARGET_FILE_DIR:eeschema_kiface>" COMMAND ${CMAKE_COMMAND} -E copy_if_different "${NGSPICE_DLL}" "$<TARGET_FILE_DIR:eeschema_kiface>"
) )
add_custom_command( TARGET eeschema_kiface POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_directory "${NGSPICE_CM_DIR}" "$<TARGET_FILE_DIR:eeschema_kiface>/ngspice"
)
endif() endif()
endif() endif()

View File

@ -128,6 +128,10 @@ if( KICAD_SPICE AND MSVC )
add_custom_command( TARGET qa_eeschema POST_BUILD add_custom_command( TARGET qa_eeschema POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different "${NGSPICE_DLL}" "$<TARGET_FILE_DIR:qa_eeschema>" COMMAND ${CMAKE_COMMAND} -E copy_if_different "${NGSPICE_DLL}" "$<TARGET_FILE_DIR:qa_eeschema>"
) )
add_custom_command( TARGET qa_eeschema POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_directory "${NGSPICE_CM_DIR}" "$<TARGET_FILE_DIR:qa_eeschema>/ngspice"
)
endif() endif()