Advertisement
Guest User

Untitled

a guest
Jul 28th, 2015
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. cmake_minimum_required(VERSION 2.8)
  2.  
  3. set(CMAKE_TOOLCHAIN_FILE "/path/to/arm-toolchain.cmake")
  4. project(Examples)
  5.  
  6. set(CMAKE_BUILD_TYPE Debug)
  7. set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-error")
  8.  
  9. include_directories("path/to/include")
  10. link_directories("path/to/lib")
  11.  
  12. add_subdirectory(Foo)
  13. add_subdirectory(Bar)
  14. add_subdirectory(Bob)
  15. add_subdirectory(Encoder)
  16.  
  17. # Use subdirectory name for executable name.
  18. get_filename_component(OutName ${CMAKE_CURRENT_SOURCE_DIR} NAME)
  19. string(REPLACE " " "_" OutName ${OutName})
  20. file(GLOB Source "src/*.cpp")
  21.  
  22. add_executable(${OutName} ${Source})
  23. target_link_libraries(${OutName} libtolink)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement