# Full-featured Build System Sample # CMake cross-platform build system recipe # 2009 Ryan Pavlik # http://academic.cleardefinition.com/ # Iowa State University HCI Graduate Program/VRAC cmake_minimum_required(VERSION 2.6) # Set package properties project(wiiuse) ### # Set up options ### option(BUILD_EXAMPLE "Should we build the example app?" YES) option(BUILD_EXAMPLE_SDL "Should we build the SDL-based example app?" YES) ### # Perform build configuration of dependencies ### # Locally-developed modules dist'ed with this app - always have this first. list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake") include(UseBackportedModules) add_definitions(-DWIIUSE_COMPILE_LIB) if(NOT WIN32 AND NOT APPLE) find_path(BLUEZ_INCLUDE_DIR bluetooth/bluetooth.h) include_directories("${BLUEZ_INCLUDE_DIR}") endif() ### # Build the project ### if(MSVC) include_directories("${CMAKE_CURRENT_SOURCE_DIR}/msvc-stdint") endif() # The lib is in the "src" subdirectory add_subdirectory(src) # Example apps if(BUILD_EXAMPLE) add_subdirectory(example) endif() if(BUILD_EXAMPLE_SDL) add_subdirectory(example-sdl) endif() ### # Other things you might like to do ### # Add nightly builds/dashboard support #include(CreateDashboardScripts) #create_dashboard_scripts(DashboardBuildInitialCache.cmake.in) ### # Set packaging options (for CPack) ### # Include the packaging system now that we have it all set up include(CPack)