Move pcbnew_navlib compilation into pcbcommon.

Although pcb_base_frame.cpp is in the pcbnew source tree, it is compiled
and included in pcbcommon.lib. Because pcb_base_frame has a dependency
on pcbnew_navlib, the latter also needs to be included in pcbcommon to
avoid linkage issues.

The superfluous references to pcbnew_navlib in the qa projects have been
removed.
This commit is contained in:
markus-bonk 2021-10-27 11:28:49 +02:00 committed by Wayne Stambaugh
parent bb542e5959
commit 8663a399ac
5 changed files with 14 additions and 17 deletions

View File

@ -157,7 +157,13 @@ option( KICAD_USE_3DCONNEXION
ON )
if( KICAD_USE_3DCONNEXION )
add_compile_definitions( KICAD_USE_3DCONNEXION )
if( WIN32 )
add_definitions( -DKICAD_USE_3DCONNEXION )
elseif( APPLE )
add_definitions( -DKICAD_USE_3DCONNEXION )
else()
remove_definitions( -DKICAD_USE_3DCONNEXION )
endif()
endif()
# Global setting: exports are explicit

View File

@ -609,6 +609,13 @@ target_link_libraries( pcbcommon PUBLIC
kiplatform
)
if( KICAD_USE_3DCONNEXION )
message( STATUS "Including 3Dconnexion SpaceMouse navigation support in pcbcommon" )
add_subdirectory( ../pcbnew/navlib ./navlib)
target_link_libraries( pcbcommon PUBLIC pcbnew_navlib)
endif()
add_dependencies( pcbcommon delaunator )
# The lemon grammar for the numeric evaluator

View File

@ -714,12 +714,6 @@ target_link_libraries( pcbnew_kiface
${PCBNEW_KIFACE_LIBRARIES}
)
if( KICAD_USE_3DCONNEXION )
message( STATUS "Including 3Dconnexion SpaceMouse navigation support in PcbNew" )
add_subdirectory( navlib )
target_link_libraries( pcbnew_kiface pcbnew_navlib)
endif()
set_source_files_properties( pcbnew.cpp PROPERTIES
# The KIFACE is in pcbnew.cpp, export it:
COMPILE_DEFINITIONS "BUILD_KIWAY_DLL;COMPILING_DLL"

View File

@ -116,9 +116,4 @@ if( WIN32 )
)
endif()
if( KICAD_USE_3DCONNEXION )
message( STATUS "Including 3Dconnexion SpaceMouse navigation support in PcbNew" )
target_link_libraries( qa_pcbnew pcbnew_navlib)
endif()
kicad_add_boost_test( qa_pcbnew qa_pcbnew )

View File

@ -63,9 +63,4 @@ target_link_libraries( qa_pcbnew_tools
${PCBNEW_EXTRA_LIBS} # -lrt must follow Boost
)
if( KICAD_USE_3DCONNEXION )
message( STATUS "Including 3Dconnexion SpaceMouse navigation support in PcbNew" )
target_link_libraries( qa_pcbnew_tools pcbnew_navlib)
endif()
kicad_add_utils_executable( qa_pcbnew_tools )