set(BINARY_SUBDIR_NAME  $<IF:$<CONFIG:Debug>,Debug,Release>)
if(NOT CFD_ROOT_BINARY_DIR)
set(CFD_ROOT_BINARY_DIR  ${CMAKE_BINARY_DIR})
set(CFD_OBJ_BINARY_DIR   ${CMAKE_BINARY_DIR}/${BINARY_SUBDIR_NAME})
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY  ${CFD_OBJ_BINARY_DIR})
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY  ${CFD_OBJ_BINARY_DIR}) # for linux
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY  ${CFD_OBJ_BINARY_DIR})
endif()
# for libwally
set(WALLY_OBJ_BINARY_DIR   ${CFD_ROOT_BINARY_DIR}/${BINARY_SUBDIR_NAME})
set(WALLY_ROOT_BINARY_DIR  ${CFD_ROOT_BINARY_DIR})
