2018-05-15 13:40:25 +00:00
|
|
|
include_directories( SYSTEM
|
|
|
|
${OCE_INCLUDE_DIRS}
|
2018-01-26 00:38:29 +00:00
|
|
|
${OCC_INCLUDE_DIR}
|
2016-09-02 10:08:40 +00:00
|
|
|
)
|
|
|
|
|
2019-04-15 17:09:27 +00:00
|
|
|
set( KS2_LIB_FILES
|
2018-09-20 09:05:52 +00:00
|
|
|
kicad2step.cpp
|
2018-10-02 06:34:07 +00:00
|
|
|
kicad2step_frame_base.cpp
|
2016-09-02 10:08:40 +00:00
|
|
|
pcb/3d_resolver.cpp
|
|
|
|
pcb/base.cpp
|
|
|
|
pcb/kicadmodel.cpp
|
2020-11-14 19:16:42 +00:00
|
|
|
pcb/kicadfootprint.cpp
|
2016-09-02 10:08:40 +00:00
|
|
|
pcb/kicadpad.cpp
|
|
|
|
pcb/kicadpcb.cpp
|
|
|
|
pcb/kicadcurve.cpp
|
|
|
|
pcb/oce_utils.cpp
|
2019-04-15 17:09:27 +00:00
|
|
|
)
|
|
|
|
|
2021-09-11 16:40:20 +00:00
|
|
|
|
2019-04-15 17:09:27 +00:00
|
|
|
# Break the library out for re-use by both kicad2step and any qa that needs it
|
|
|
|
# In future, this could move for re-use by other programs needing s-expr support (?)
|
2021-12-30 15:18:30 +00:00
|
|
|
add_library( kicad2step_lib STATIC
|
2019-04-15 17:09:27 +00:00
|
|
|
${KS2_LIB_FILES}
|
|
|
|
)
|
|
|
|
|
|
|
|
target_include_directories( kicad2step_lib PUBLIC
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}
|
2019-04-15 17:29:03 +00:00
|
|
|
${CMAKE_SOURCE_DIR}/include # for core
|
2021-10-17 15:40:52 +00:00
|
|
|
${Boost_INCLUDE_DIR} # see commit 03bce554
|
|
|
|
${CMAKE_SOURCE_DIR}/libs/kimath/include
|
|
|
|
${INC_AFTER}
|
2019-04-15 17:09:27 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
target_link_libraries( kicad2step_lib
|
|
|
|
sexpr
|
2021-09-11 16:40:20 +00:00
|
|
|
${wxWidgets_LIBRARIES}
|
|
|
|
${OCC_LIBRARIES}
|
|
|
|
${ZLIB_LIBRARIES}
|
2021-10-17 15:40:52 +00:00
|
|
|
kimath
|
2019-04-15 17:09:27 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
set( K2S_FILES
|
2021-09-11 16:40:20 +00:00
|
|
|
kicad2step_app.cpp
|
2016-09-02 10:08:40 +00:00
|
|
|
)
|
|
|
|
|
2017-03-09 02:40:41 +00:00
|
|
|
if( MINGW )
|
|
|
|
list( APPEND K2S_FILES ${CMAKE_SOURCE_DIR}/common/streamwrapper.cpp )
|
|
|
|
endif( MINGW )
|
|
|
|
|
2021-09-11 16:40:20 +00:00
|
|
|
add_executable( kicad2step_bin WIN32 ${K2S_FILES} )
|
2017-03-09 02:40:41 +00:00
|
|
|
|
2021-09-11 16:40:20 +00:00
|
|
|
target_link_libraries( kicad2step_bin
|
|
|
|
kicad2step_lib )
|
2020-08-26 02:27:08 +00:00
|
|
|
|
|
|
|
target_include_directories( kicad2step_lib PRIVATE
|
|
|
|
$<TARGET_PROPERTY:gzip-hpp,INTERFACE_INCLUDE_DIRECTORIES>
|
|
|
|
)
|
2016-09-02 10:08:40 +00:00
|
|
|
|
2021-09-11 16:40:20 +00:00
|
|
|
set_target_properties( kicad2step_bin
|
|
|
|
PROPERTIES OUTPUT_NAME kicad2step)
|
|
|
|
|
2016-09-10 23:19:56 +00:00
|
|
|
if( APPLE )
|
|
|
|
# puts binaries into the *.app bundle while linking
|
2021-09-11 16:40:20 +00:00
|
|
|
set_target_properties( kicad2step_bin PROPERTIES
|
2016-09-10 23:19:56 +00:00
|
|
|
RUNTIME_OUTPUT_DIRECTORY ${OSX_BUNDLE_BUILD_BIN_DIR}
|
|
|
|
)
|
|
|
|
else()
|
2021-12-30 15:18:30 +00:00
|
|
|
install( TARGETS kicad2step_bin
|
2021-09-11 16:40:20 +00:00
|
|
|
RUNTIME DESTINATION ${KICAD_BIN}
|
2021-09-20 09:52:31 +00:00
|
|
|
ARCHIVE DESTINATION ${KICAD_LIB}
|
2016-09-10 23:19:56 +00:00
|
|
|
COMPONENT binary )
|
|
|
|
endif()
|
2021-07-15 03:31:56 +00:00
|
|
|
|
|
|
|
if( KICAD_WIN32_INSTALL_PDBS )
|
|
|
|
# Get the PDBs to copy over for MSVC
|
2021-09-11 16:40:20 +00:00
|
|
|
install(FILES $<TARGET_PDB_FILE:kicad2step_bin> DESTINATION ${KICAD_BIN})
|
2021-12-11 13:48:08 +00:00
|
|
|
endif()
|