A SystemC productivity library for virtual platform development utilizing SCV and TLM2.0 https://www.minres.com/#opensource

CMakeLists.txt 1.3KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. cmake_minimum_required(VERSION 3.3)
  2. set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/../cmake) # main (top) cmake dir
  3. set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake) # project specific cmake dir
  4. project (sc-components)
  5. # Set the version number of your project here (format is MAJOR.MINOR.PATCHLEVEL - e.g. 1.0.0)
  6. set(VERSION_MAJOR "0")
  7. set(VERSION_MINOR "0")
  8. set(VERSION_PATCH "1")
  9. set(VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH})
  10. include(Common)
  11. list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR})
  12. find_package(Threads)
  13. find_package(SystemC REQUIRED)
  14. find_package(ZLIB)
  15. if(SystemC_FOUND)
  16. include_directories(${SystemC_INCLUDE_DIRS})
  17. link_directories(${SystemC_LIBRARY_DIRS})
  18. else()
  19. message( FATAL_ERROR "SystemC library not found." )
  20. endif()
  21. if(CCI_FOUND)
  22. include_directories(${CCI_INCLUDE_DIRS})
  23. link_directories(${CCI_LIBRARY_DIRS})
  24. else()
  25. message( FATAL_ERROR "SystemC CCI library not found." )
  26. endif()
  27. if(ZLIB_FOUND)
  28. include_directories( ${ZLIB_INCLUDE_DIRS} )
  29. #link_directories(${ZLIB_LIBRARY_DIRS})
  30. message( STATUS "ZLib found at ${ZLIB_INCLUDE_DIRS}." )
  31. endif(ZLIB_FOUND)
  32. if(SCV_FOUND)
  33. add_definitions(-DWITH_SCV)
  34. include_directories(${SCV_INCLUDE_DIRS})
  35. link_directories(${SCV_LIBRARY_DIRS})
  36. endif(SCV_FOUND)
  37. add_subdirectory (src)