blob: ecc2bb6f05a9ad8f6f61b2551987b5aee07f4fdd [file] [log] [blame]
function(add_compiler_flag flag)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${flag}" PARENT_SCOPE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${flag}" PARENT_SCOPE)
endfunction()
if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
add_compiler_flag("-DPLATFORM_LINUX=1")
add_compiler_flag("-DPLATFORM_POSIX=1")
elseif (${CMAKE_SYSTEM_NAME} MATCHES "Windows")
add_compiler_flag("-DPLATFORM_WINDOWS=1")
else()
message(FATAL_ERROR "Platform unset, build will fail--stopping at CMake time.")
endif()
add_subdirectory(common)
add_subdirectory(nulldrv)
if (NOT WIN32)
add_subdirectory(intel)
endif()