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.

26 lines
538 B

  1. # Setup cmake
  2. cmake_minimum_required(VERSION 2.6)
  3. # Set version number
  4. set(Tutorial_VERSION_MAJOR 1)
  5. set(Tutorial_VERSION_MINOR 0)
  6. # Setup project
  7. project(Toxbot C)
  8. # Find dependencies
  9. list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake) # set module path
  10. find_package(libtoxcore REQUIRED)
  11. # Add executable
  12. add_executable(Toxbot toxbot.c)
  13. # Setup the include and linker paths
  14. include_directories(
  15. ${libtoxcore_INCLUDE_DIRS}
  16. )
  17. set(LIBS ${LIBS} ${libtoxcore_LIBRARIES})
  18. # Link libraries
  19. target_link_libraries(Toxbot ${LIBS})