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.

77 lines
1.9 KiB

  1. include_directories( SYSTEM
  2. ${OCE_INCLUDE_DIRS}
  3. ${OCC_INCLUDE_DIR}
  4. )
  5. set( KS2_LIB_FILES
  6. kicad2step.cpp
  7. kicad2step_frame_base.cpp
  8. pcb/3d_resolver.cpp
  9. pcb/base.cpp
  10. pcb/kicadmodel.cpp
  11. pcb/kicadfootprint.cpp
  12. pcb/kicadpad.cpp
  13. pcb/kicadpcb.cpp
  14. pcb/kicadcurve.cpp
  15. pcb/oce_utils.cpp
  16. )
  17. # Break the library out for re-use by both kicad2step and any qa that needs it
  18. # In future, this could move for re-use by other programs needing s-expr support (?)
  19. add_library( kicad2step_lib OBJECT
  20. ${KS2_LIB_FILES}
  21. )
  22. target_include_directories( kicad2step_lib PUBLIC
  23. ${CMAKE_CURRENT_SOURCE_DIR}
  24. ${CMAKE_SOURCE_DIR}/include # for core
  25. ${Boost_INCLUDE_DIR} # see commit 03bce554
  26. ${CMAKE_SOURCE_DIR}/libs/kimath/include
  27. ${INC_AFTER}
  28. )
  29. target_link_libraries( kicad2step_lib
  30. sexpr
  31. ${wxWidgets_LIBRARIES}
  32. ${OCC_LIBRARIES}
  33. ${ZLIB_LIBRARIES}
  34. kimath
  35. )
  36. set( K2S_FILES
  37. kicad2step_app.cpp
  38. )
  39. if( MINGW )
  40. list( APPEND K2S_FILES ${CMAKE_SOURCE_DIR}/common/streamwrapper.cpp )
  41. endif( MINGW )
  42. add_executable( kicad2step_bin WIN32 ${K2S_FILES} )
  43. target_link_libraries( kicad2step_bin
  44. kicad2step_lib )
  45. target_include_directories( kicad2step_lib PRIVATE
  46. $<TARGET_PROPERTY:gzip-hpp,INTERFACE_INCLUDE_DIRECTORIES>
  47. )
  48. set_target_properties( kicad2step_bin
  49. PROPERTIES OUTPUT_NAME kicad2step)
  50. if( APPLE )
  51. # puts binaries into the *.app bundle while linking
  52. set_target_properties( kicad2step_bin PROPERTIES
  53. RUNTIME_OUTPUT_DIRECTORY ${OSX_BUNDLE_BUILD_BIN_DIR}
  54. )
  55. else()
  56. install( TARGETS kicad2step_bin kicad2step_lib
  57. RUNTIME DESTINATION ${KICAD_BIN}
  58. ARCHIVE DESTINATION ${KICAD_LIB}
  59. COMPONENT binary )
  60. endif()
  61. if( KICAD_WIN32_INSTALL_PDBS )
  62. # Get the PDBs to copy over for MSVC
  63. install(FILES $<TARGET_PDB_FILE:kicad2step_bin> DESTINATION ${KICAD_BIN})
  64. endif()