mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-09-15 10:43:15 +02:00
Fix some ngspice handling during build for MSVC
This commit is contained in:
parent
a11f48ef10
commit
22649f79e8
@ -125,6 +125,14 @@ if( WIN32 AND MSYS )
|
|||||||
else()
|
else()
|
||||||
message( STATUS ": libngspice shared lib found: ${NGSPICE_DLL}\n" )
|
message( STATUS ": libngspice shared lib found: ${NGSPICE_DLL}\n" )
|
||||||
endif()
|
endif()
|
||||||
|
elseif( WIN32 AND MSVC )
|
||||||
|
find_file( NGSPICE_DLL NAMES ngspice.dll
|
||||||
|
PATHS
|
||||||
|
${NGSPICE_ROOT_DIR}
|
||||||
|
PATH_SUFFIXES
|
||||||
|
bin
|
||||||
|
lib
|
||||||
|
)
|
||||||
else()
|
else()
|
||||||
set( NGSPICE_DLL "${NGSPICE_LIBRARY}" )
|
set( NGSPICE_DLL "${NGSPICE_LIBRARY}" )
|
||||||
endif()
|
endif()
|
||||||
|
@ -474,6 +474,13 @@ if( KICAD_SPICE )
|
|||||||
PRIVATE
|
PRIVATE
|
||||||
${NGSPICE_LIBRARY}
|
${NGSPICE_LIBRARY}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if( MSVC )
|
||||||
|
# Allow for MSVC to debug ngspice from the build directory
|
||||||
|
add_custom_command( TARGET eeschema_kiface POST_BUILD
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different "${NGSPICE_DLL}" "$<TARGET_FILE_DIR:eeschema_kiface>"
|
||||||
|
)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set_target_properties( eeschema_kiface PROPERTIES
|
set_target_properties( eeschema_kiface PROPERTIES
|
||||||
|
@ -99,6 +99,7 @@ add_executable( qa_eeschema
|
|||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries( qa_eeschema
|
target_link_libraries( qa_eeschema
|
||||||
|
PRIVATE
|
||||||
eeschema_kiface_objects
|
eeschema_kiface_objects
|
||||||
common
|
common
|
||||||
pcbcommon
|
pcbcommon
|
||||||
@ -110,6 +111,14 @@ target_link_libraries( qa_eeschema
|
|||||||
${Boost_LIBRARIES}
|
${Boost_LIBRARIES}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if( KICAD_SPICE AND MSVC )
|
||||||
|
# Allow for MSVC to run from the build directory
|
||||||
|
add_custom_command( TARGET qa_eeschema POST_BUILD
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different "${NGSPICE_DLL}" "$<TARGET_FILE_DIR:qa_eeschema>"
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
|
||||||
# Eeschema tests, so pretend to be eeschema (for units, etc)
|
# Eeschema tests, so pretend to be eeschema (for units, etc)
|
||||||
target_compile_definitions( qa_eeschema
|
target_compile_definitions( qa_eeschema
|
||||||
PUBLIC EESCHEMA
|
PUBLIC EESCHEMA
|
||||||
|
Loading…
x
Reference in New Issue
Block a user