CMakeLists.txt 766 B

1234567891011121314151617181920212223242526272829
  1. IF(CMAKE_VERSION VERSION_LESS 2.8.8)
  2. MESSAGE("-- Unit tests are only available in CMake >=2.8.8. You have ${CMAKE_VERSION}")
  3. RETURN()
  4. ENDIF()
  5. INCLUDE_DIRECTORIES("${CMAKE_CURRENT_SOURCE_DIR}")
  6. INCLUDE_DIRECTORIES("${CMAKE_CURRENT_BINARY_DIR}")
  7. INCLUDE_DIRECTORIES("${CMAKE_SOURCE_DIR}/include")
  8. INCLUDE_DIRECTORIES("${CMAKE_BINARY_DIR}")
  9. SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=c++0x")
  10. SET(CMAKE_AUTOMOC ON)
  11. ADD_EXECUTABLE(tests
  12. EXCLUDE_FROM_ALL
  13. main.cpp
  14. QTestSuite
  15. $<TARGET_OBJECTS:lmmsobjs>
  16. src/core/AutomatableModelTest.cpp
  17. src/core/ProjectVersionTest.cpp
  18. src/core/RelativePathsTest.cpp
  19. src/tracks/AutomationTrackTest.cpp
  20. )
  21. TARGET_LINK_LIBRARIES(tests ${QT_LIBRARIES} ${QT_QTTEST_LIBRARY})
  22. TARGET_LINK_LIBRARIES(tests ${LMMS_REQUIRED_LIBS})