cmake_minimum_required(VERSION 3.15.2)
# 设置项目名称与语言
project(LIBTESS VERSION 1.6)
# 设置安装地址
if(${CMAKE_HOST_SYSTEM_NAME} STREQUAL "Linux")
	message(STATUS "Platform: " ${CMAKE_HOST_SYSTEM_NAME})
	# 安装到stow目录
	set(CMAKE_INSTALL_PREFIX /opt/stow/tesseroids)
elseif (${CMAKE_HOST_SYSTEM_NAME} STREQUAL "Darwin")
	message(STATUS "Platform: " ${CMAKE_HOST_SYSTEM_NAME})
	# 安装到stow目录
	set(CMAKE_INSTALL_PREFIX /opt/stow/tesseroids)
elseif (${CMAKE_HOST_SYSTEM_NAME} STREQUAL "Windows")
	message(STATUS "Platform: " ${CMAKE_HOST_SYSTEM_NAME})
	# 使用MinGW GCC编译时需取消注释
	#set(CMAKE_C_COMPILER gcc)
	#set(CMAKE_CXX_COMPILER g++)
	set(CMAKE_INSTALL_PREFIX D:/Library)
else()
	message(STATUS "Platform: " ${CMAKE_HOST_SYSTEM_NAME})
	set(CMAKE_INSTALL_PREFIX /opt/stow/tesseroids)
endif()
message(STATUS "Install prefix: " ${CMAKE_INSTALL_PREFIX})

# 添加库源文件地址
add_subdirectory(lib)
add_subdirectory(toolkits)
add_subdirectory(test)