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.

68 lines
2.3 KiB

  1. # This program source code file is part of KiCad, a free EDA CAD application.
  2. #
  3. # Copyright (C) 2018 KiCad Developers, see CHANGELOG.TXT for contributors.
  4. #
  5. # This program is free software; you can redistribute it and/or
  6. # modify it under the terms of the GNU General Public License
  7. # as published by the Free Software Foundation; either version 2
  8. # of the License, or (at your option) any later version.
  9. #
  10. # This program is distributed in the hope that it will be useful,
  11. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. # GNU General Public License for more details.
  14. #
  15. # You should have received a copy of the GNU General Public License
  16. # along with this program; if not, you may find one here:
  17. # http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
  18. # or you may search the http://www.gnu.org website for the version 2 license,
  19. # or you may write to the Free Software Foundation, Inc.,
  20. # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
  21. set( QA_GERBVIEW_SRCS
  22. # The main test entry points
  23. test_module.cpp
  24. # Shared between programs, but dependent on the BIU
  25. ${CMAKE_SOURCE_DIR}/qa/common/test_format_units.cpp
  26. )
  27. add_executable( qa_gerbview
  28. ${QA_GERBVIEW_SRCS}
  29. # In order to enable this, the actual Gerbview kiface build must be updated to match pcbnew's
  30. # Older CMakes cannot link OBJECT libraries
  31. # https://cmake.org/pipermail/cmake/2013-November/056263.html
  32. $<TARGET_OBJECTS:gerbview_kiface_objects>
  33. )
  34. # Gerbview tests, so pretend to be gerbview (for units, etc)
  35. target_compile_definitions( qa_gerbview
  36. PRIVATE GERBVIEW
  37. )
  38. target_include_directories( qa_gerbview PRIVATE
  39. ${CMAKE_SOURCE_DIR}/include
  40. )
  41. # Anytime we link to the kiface_objects, we have to add a dependency on the last object
  42. # to ensure that the generated lexer files are finished being used before the qa runs in a
  43. # multi-threaded build
  44. add_dependencies( qa_gerbview gerbview )
  45. target_link_libraries( qa_gerbview
  46. pcbcommon
  47. gal
  48. common
  49. gal
  50. qa_utils
  51. unit_test_utils
  52. ${wxWidgets_LIBRARIES}
  53. ${GDI_PLUS_LIBRARIES}
  54. ${PYTHON_LIBRARIES}
  55. ${Boost_LIBRARIES} # must follow GITHUB
  56. ${PCBNEW_EXTRA_LIBS} # -lrt must follow Boost
  57. )
  58. kicad_add_boost_test( qa_gerbview qa_gerbview )