You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

58 lines
1.3 KiB

  1. include_directories( SYSTEM
  2. ${OCE_INCLUDE_DIRS}
  3. ${OCC_INCLUDE_DIR}
  4. )
  5. set( KS2_LIB_FILES
  6. pcb/3d_resolver.cpp
  7. pcb/base.cpp
  8. pcb/kicadmodel.cpp
  9. pcb/kicadmodule.cpp
  10. pcb/kicadpad.cpp
  11. pcb/kicadpcb.cpp
  12. pcb/kicadcurve.cpp
  13. pcb/oce_utils.cpp
  14. )
  15. # Break the library out for re-use by both kicad2step and any qa that needs it
  16. # In future, this could move for re-use by other programs needing s-expr support (?)
  17. add_library( kicad2step_lib STATIC
  18. ${KS2_LIB_FILES}
  19. )
  20. target_include_directories( kicad2step_lib PUBLIC
  21. ${CMAKE_CURRENT_SOURCE_DIR}
  22. ${CMAKE_SOURCE_DIR}/include # for core
  23. )
  24. target_link_libraries( kicad2step_lib
  25. sexpr
  26. Boost::boost
  27. )
  28. set( K2S_FILES
  29. kicad2step.cpp
  30. )
  31. if( MINGW )
  32. list( APPEND K2S_FILES ${CMAKE_SOURCE_DIR}/common/streamwrapper.cpp )
  33. endif( MINGW )
  34. add_executable( kicad2step ${K2S_FILES} )
  35. target_link_libraries( kicad2step
  36. kicad2step_lib
  37. ${wxWidgets_LIBRARIES}
  38. ${OCC_LIBRARIES}
  39. )
  40. if( APPLE )
  41. # puts binaries into the *.app bundle while linking
  42. set_target_properties( kicad2step PROPERTIES
  43. RUNTIME_OUTPUT_DIRECTORY ${OSX_BUNDLE_BUILD_BIN_DIR}
  44. )
  45. else()
  46. install( TARGETS kicad2step
  47. DESTINATION ${KICAD_BIN}
  48. COMPONENT binary )
  49. endif()