Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- cmake_minimum_required(VERSION 2.8)
- set(CMAKE_TOOLCHAIN_FILE "/path/to/arm-toolchain.cmake")
- project(Examples)
- set(CMAKE_BUILD_TYPE Debug)
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-error")
- include_directories("path/to/include")
- link_directories("path/to/lib")
- add_subdirectory(Foo)
- add_subdirectory(Bar)
- add_subdirectory(Bob)
- add_subdirectory(Encoder)
- # Use subdirectory name for executable name.
- get_filename_component(OutName ${CMAKE_CURRENT_SOURCE_DIR} NAME)
- string(REPLACE " " "_" OutName ${OutName})
- file(GLOB Source "src/*.cpp")
- add_executable(${OutName} ${Source})
- target_link_libraries(${OutName} libtolink)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement