2019-11-23 20:27:39 +08:00
|
|
|
#/****************************************************************************
|
|
|
|
# Copyright (c) 2015-2017 Chukong Technologies Inc.
|
|
|
|
#
|
2022-10-01 16:24:52 +08:00
|
|
|
# https://axmolengine.github.io/
|
2019-11-23 20:27:39 +08:00
|
|
|
#
|
|
|
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
|
|
# of this software and associated documentation files (the "Software"), to deal
|
|
|
|
# in the Software without restriction, including without limitation the rights
|
|
|
|
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
|
|
# copies of the Software, and to permit persons to whom the Software is
|
|
|
|
# furnished to do so, subject to the following conditions:
|
|
|
|
|
|
|
|
# The above copyright notice and this permission notice shall be included in
|
|
|
|
# all copies or substantial portions of the Software.
|
|
|
|
|
|
|
|
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
|
|
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
|
|
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
|
|
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
|
|
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
|
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
|
|
# THE SOFTWARE.
|
|
|
|
# ****************************************************************************/
|
|
|
|
|
|
|
|
if(ANDROID)
|
2022-01-04 09:42:10 +08:00
|
|
|
# refer to target: core/platform/android/CMakeLists.txt
|
2022-08-11 15:41:10 +08:00
|
|
|
set(_AX_PLATFORM_SPECIFIC_SRC
|
2023-06-11 13:08:08 +08:00
|
|
|
platform/android/Application-android.cpp
|
|
|
|
platform/android/Common-android.cpp
|
|
|
|
platform/android/GLViewImpl-android.cpp
|
|
|
|
platform/android/FileUtils-android.cpp
|
|
|
|
platform/android/EnhanceAPI-android.cpp
|
2019-11-23 20:27:39 +08:00
|
|
|
)
|
|
|
|
elseif(WINDOWS)
|
2023-03-11 22:10:18 +08:00
|
|
|
|
|
|
|
if (NOT WINRT)
|
|
|
|
set(_AX_PLATFORM_SPECIFIC_HEADER
|
|
|
|
platform/win32/compat/stdint.h
|
2023-06-11 13:08:08 +08:00
|
|
|
platform/win32/Application-win32.h
|
|
|
|
platform/win32/GL-win32.h
|
|
|
|
platform/win32/FileUtils-win32.h
|
|
|
|
platform/win32/StdC-win32.h
|
|
|
|
platform/win32/PlatformDefine-win32.h
|
|
|
|
platform/desktop/GLViewImpl-desktop.h
|
2023-03-11 22:10:18 +08:00
|
|
|
)
|
|
|
|
set(_AX_PLATFORM_SPECIFIC_SRC
|
2023-06-11 13:08:08 +08:00
|
|
|
platform/win32/StdC-win32.cpp
|
|
|
|
platform/win32/FileUtils-win32.cpp
|
|
|
|
platform/win32/Common-win32.cpp
|
|
|
|
platform/win32/Application-win32.cpp
|
|
|
|
platform/win32/Device-win32.cpp
|
|
|
|
platform/desktop/GLViewImpl-desktop.cpp
|
2023-03-11 22:10:18 +08:00
|
|
|
)
|
|
|
|
else()
|
|
|
|
file(GLOB _AX_PLATFORM_SPECIFIC_HEADER platform/winrt/*.h)
|
|
|
|
file(GLOB _AX_PLATFORM_SPECIFIC_SRC platform/winrt/*.cpp)
|
|
|
|
endif()
|
2019-11-23 20:27:39 +08:00
|
|
|
|
|
|
|
elseif(APPLE)
|
2022-08-11 15:41:10 +08:00
|
|
|
set(_AX_PLATFORM_SPECIFIC_HEADER
|
2023-06-11 13:08:08 +08:00
|
|
|
platform/apple/FileUtils-apple.h
|
|
|
|
platform/apple/Device-apple.h
|
2019-11-23 20:27:39 +08:00
|
|
|
)
|
2022-08-11 15:41:10 +08:00
|
|
|
set(_AX_PLATFORM_SPECIFIC_SRC
|
2023-06-11 13:08:08 +08:00
|
|
|
platform/apple/FileUtils-apple.mm
|
|
|
|
platform/apple/Device-apple.mm
|
2019-11-23 20:27:39 +08:00
|
|
|
)
|
|
|
|
if(MACOSX)
|
2022-08-11 15:41:10 +08:00
|
|
|
set(_AX_PLATFORM_SPECIFIC_HEADER
|
|
|
|
${_AX_PLATFORM_SPECIFIC_HEADER}
|
2023-06-11 13:08:08 +08:00
|
|
|
platform/mac/StdC-mac.h
|
|
|
|
platform/mac/PlatformDefine-mac.h
|
|
|
|
platform/mac/Application-mac.h
|
|
|
|
platform/desktop/GLViewImpl-desktop.h
|
2019-11-23 20:27:39 +08:00
|
|
|
)
|
2022-08-11 15:41:10 +08:00
|
|
|
set(_AX_PLATFORM_SPECIFIC_SRC
|
|
|
|
${_AX_PLATFORM_SPECIFIC_SRC}
|
2023-06-11 13:08:08 +08:00
|
|
|
platform/mac/Application-mac.mm
|
|
|
|
platform/mac/Common-mac.mm
|
|
|
|
platform/mac/Device-mac.mm
|
|
|
|
platform/desktop/GLViewImpl-desktop.cpp
|
2019-11-23 20:27:39 +08:00
|
|
|
)
|
2023-06-11 13:08:08 +08:00
|
|
|
set_source_files_properties(platform/desktop/GLViewImpl-desktop.cpp PROPERTIES LANGUAGE OBJCXX)
|
2019-11-23 20:27:39 +08:00
|
|
|
elseif(IOS)
|
2022-08-11 15:41:10 +08:00
|
|
|
set(_AX_PLATFORM_SPECIFIC_HEADER
|
|
|
|
${_AX_PLATFORM_SPECIFIC_HEADER}
|
2023-06-11 13:08:08 +08:00
|
|
|
platform/ios/Application-ios.h
|
|
|
|
platform/ios/DirectorCaller-ios.h
|
|
|
|
platform/ios/EAGLView-ios.h
|
|
|
|
platform/ios/GLViewImpl-ios.h
|
|
|
|
platform/ios/PlatformDefine-ios.h
|
|
|
|
platform/ios/StdC-ios.h
|
|
|
|
platform/ios/InputView-ios.h
|
2019-11-23 20:27:39 +08:00
|
|
|
)
|
2022-08-11 15:41:10 +08:00
|
|
|
set(_AX_PLATFORM_SPECIFIC_SRC
|
|
|
|
${_AX_PLATFORM_SPECIFIC_SRC}
|
2023-06-11 13:08:08 +08:00
|
|
|
platform/ios/Application-ios.mm
|
|
|
|
platform/ios/Common-ios.mm
|
|
|
|
platform/ios/Device-ios.mm
|
|
|
|
platform/ios/DirectorCaller-ios.mm
|
|
|
|
platform/ios/EAGLView-ios.mm
|
|
|
|
platform/ios/GLViewImpl-ios.mm
|
|
|
|
platform/ios/Image-ios.mm
|
|
|
|
platform/ios/InputView-ios.mm
|
2019-11-23 20:27:39 +08:00
|
|
|
)
|
2020-08-28 12:57:00 +08:00
|
|
|
|
2023-08-25 16:57:38 +08:00
|
|
|
if(NOT AX_USE_ANGLE)
|
2022-08-11 15:41:10 +08:00
|
|
|
set(_AX_PLATFORM_SPECIFIC_HEADER
|
|
|
|
${_AX_PLATFORM_SPECIFIC_HEADER}
|
2023-08-25 16:57:38 +08:00
|
|
|
platform/ios/ES2Renderer-ios.h
|
|
|
|
platform/ios/ES2Renderer-ios.h
|
2023-06-11 13:08:08 +08:00
|
|
|
platform/ios/ESRenderer-ios.h
|
|
|
|
platform/ios/GL-ios.h
|
2020-08-28 12:57:00 +08:00
|
|
|
platform/ios/OpenGL_Internal-ios.h
|
|
|
|
)
|
2022-08-11 15:41:10 +08:00
|
|
|
set(_AX_PLATFORM_SPECIFIC_SRC
|
|
|
|
${_AX_PLATFORM_SPECIFIC_SRC}
|
2023-08-25 16:57:38 +08:00
|
|
|
platform/ios/ES2Renderer-ios.m
|
2020-08-28 12:57:00 +08:00
|
|
|
)
|
|
|
|
endif()
|
2019-11-23 20:27:39 +08:00
|
|
|
endif()
|
|
|
|
|
|
|
|
elseif(LINUX)
|
|
|
|
|
|
|
|
if(NOT CMAKE_CROSSCOMPILING)
|
|
|
|
include_directories(
|
|
|
|
/usr/include
|
|
|
|
/usr/include/GLFW
|
|
|
|
/usr/local/include/GLFW
|
|
|
|
)
|
|
|
|
endif(NOT CMAKE_CROSSCOMPILING)
|
|
|
|
|
2022-08-11 15:41:10 +08:00
|
|
|
set(_AX_PLATFORM_SPECIFIC_HEADER
|
2023-06-11 13:08:08 +08:00
|
|
|
platform/linux/Application-linux.h
|
|
|
|
platform/linux/GL-linux.h
|
|
|
|
platform/linux/StdC-linux.h
|
|
|
|
platform/linux/FileUtils-linux.h
|
|
|
|
platform/linux/PlatformDefine-linux.h
|
|
|
|
platform/desktop/GLViewImpl-desktop.h
|
2019-11-23 20:27:39 +08:00
|
|
|
)
|
2022-08-11 15:41:10 +08:00
|
|
|
set(_AX_PLATFORM_SPECIFIC_SRC
|
2023-06-11 13:08:08 +08:00
|
|
|
platform/linux/FileUtils-linux.cpp
|
|
|
|
platform/linux/Common-linux.cpp
|
|
|
|
platform/linux/Application-linux.cpp
|
|
|
|
platform/linux/Device-linux.cpp
|
|
|
|
platform/desktop/GLViewImpl-desktop.cpp
|
2019-11-23 20:27:39 +08:00
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
2022-08-11 15:41:10 +08:00
|
|
|
set(_AX_PLATFORM_HEADER
|
|
|
|
${_AX_PLATFORM_SPECIFIC_HEADER}
|
2023-06-11 13:08:08 +08:00
|
|
|
platform/Application.h
|
|
|
|
platform/ApplicationProtocol.h
|
|
|
|
platform/Common.h
|
|
|
|
platform/Device.h
|
|
|
|
platform/FileUtils.h
|
|
|
|
platform/GL.h
|
|
|
|
platform/GLView.h
|
|
|
|
platform/Image.h
|
|
|
|
platform/PlatformConfig.h
|
|
|
|
platform/PlatformDefine.h
|
|
|
|
platform/PlatformMacros.h
|
|
|
|
platform/SAXParser.h
|
|
|
|
platform/StdC.h
|
|
|
|
platform/FileStream.h
|
2023-08-25 16:57:38 +08:00
|
|
|
platform/PosixFileStream.h
|
2019-11-23 20:27:39 +08:00
|
|
|
)
|
|
|
|
|
2022-08-11 15:41:10 +08:00
|
|
|
set(_AX_PLATFORM_SRC
|
|
|
|
${_AX_PLATFORM_SPECIFIC_SRC}
|
2023-06-11 13:08:08 +08:00
|
|
|
platform/SAXParser.cpp
|
|
|
|
platform/GLView.cpp
|
|
|
|
platform/FileUtils.cpp
|
|
|
|
platform/Image.cpp
|
|
|
|
platform/FileStream.cpp
|
2023-08-25 16:57:38 +08:00
|
|
|
platform/PosixFileStream.cpp
|
2019-11-23 20:27:39 +08:00
|
|
|
)
|