#
# Build LowLevel
#

SET(PHYSX_SOURCE_DIR ${PROJECT_SOURCE_DIR}/../../../)

SET(LL_SOURCE_DIR ${PHYSX_SOURCE_DIR}/LowLevel)

FIND_PACKAGE(nvToolsExt REQUIRED)

SET(LOWLEVEL_PLATFORM_INCLUDES
	${NVTOOLSEXT_INCLUDE_DIRS}
	${PHYSX_SOURCE_DIR}/Common/src/linux
	${PHYSX_SOURCE_DIR}/LowLevel/software/include/linux
	${PHYSX_SOURCE_DIR}/LowLevelDynamics/include/linux
	${PHYSX_SOURCE_DIR}/LowLevel/common/include/pipeline/linux
)

SET(LOWLEVEL_COMPILE_DEFS
	# Common to all configurations
	${PHYSX_ANDROID_COMPILE_DEFS};PX_PHYSX_STATIC_LIB;
)

if(${CMAKE_BUILD_TYPE_LOWERCASE} STREQUAL "debug")
	LIST(APPEND LOWLEVEL_COMPILE_DEFS
		${PHYSX_ANDROID_DEBUG_COMPILE_DEFS};
	)
elseif(${CMAKE_BUILD_TYPE_LOWERCASE} STREQUAL "checked")
	LIST(APPEND LOWLEVEL_COMPILE_DEFS
		${PHYSX_ANDROID_CHECKED_COMPILE_DEFS};
	)
elseif(${CMAKE_BUILD_TYPE_LOWERCASE} STREQUAL "profile")
	LIST(APPEND LOWLEVEL_COMPILE_DEFS
		${PHYSX_ANDROID_PROFILE_COMPILE_DEFS};
	)
elseif(${CMAKE_BUILD_TYPE_LOWERCASE} STREQUAL "release")
	LIST(APPEND LOWLEVEL_COMPILE_DEFS
		${PHYSX_ANDROID_RELEASE_COMPILE_DEFS}
	)
else(${CMAKE_BUILD_TYPE_LOWERCASE} STREQUAL "debug")
	MESSAGE(FATAL_ERROR "Unknown configuration ${CMAKE_BUILD_TYPE}")
endif(${CMAKE_BUILD_TYPE_LOWERCASE} STREQUAL "debug")

SET(LOWLEVEL_LIBTYPE OBJECT)

# include common low level settings
INCLUDE(../common/LowLevel.cmake)

