2
0

CMakeLists.txt 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. # Our core file list
  2. file(GLOB swclt_test_deps [LIST_DIRECTORIES false]
  3. ${CMAKE_CURRENT_LIST_DIR}/*.h
  4. ${CMAKE_CURRENT_LIST_DIR}/*.c
  5. ${CMAKE_CURRENT_LIST_DIR}/cases/*.c
  6. ${CMAKE_CURRENT_LIST_DIR}/cases/*.h
  7. ${CMAKE_CURRENT_LIST_DIR}/util/*.h
  8. )
  9. if (KS_PLAT_WIN)
  10. source_group(TREE ${CMAKE_CURRENT_LIST_DIR} FILES ${swclt_test_deps})
  11. endif()
  12. add_executable(
  13. swclt_test
  14. ${swclt_test_deps}
  15. )
  16. # Link to signal-wire-client/catch/LibPal
  17. target_link_libraries(swclt_test signalwire_client)
  18. # Register our tests with cmake
  19. add_test(swclt_test swclt_test)
  20. # Include our root
  21. target_include_directories(
  22. swclt_test
  23. PUBLIC
  24. ${CMAKE_CURRENT_LIST_DIR}
  25. )
  26. # Copy the config files to the build dir
  27. # configure_file(cfg/swclt_test.cfg ${CMAKE_BINARY_DIR}/swclt_test.cfg COPYONLY)
  28. # When debugging on windows, the cwd will be the binary dir (where the config files are)
  29. set_target_properties(swclt_test PROPERTIES VS_DEBUGGER_WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
  30. set(COTIRE_MINIMUM_NUMBER_OF_TARGET_SOURCES 1)
  31. set_target_properties(swclt_test PROPERTIES COTIRE_ADD_UNITY_BUILD FALSE)
  32. set_target_properties(swclt_test PROPERTIES COTIRE_ENABLE_PRECOMPILED_HEADER TRUE)
  33. set_target_properties(swclt_test PROPERTIES COTIRE_CXX_PREFIX_HEADER_INIT "swclt_test.h")
  34. cotire(swclt_test)