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
|
2023-09-07 19:32:06 +08:00
|
|
|
platform/GLViewImpl.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
|
2023-09-07 19:32:06 +08:00
|
|
|
platform/GLViewImpl.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
|
2023-09-07 19:32:06 +08:00
|
|
|
platform/GLViewImpl.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
|
2023-09-07 19:32:06 +08:00
|
|
|
platform/GLViewImpl.cpp
|
2019-11-23 20:27:39 +08:00
|
|
|
)
|
2023-09-07 19:32:06 +08:00
|
|
|
set_source_files_properties(platform/GLViewImpl.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-09-02 19:56:50 +08:00
|
|
|
if(AX_USE_GL)
|
2022-08-11 15:41:10 +08:00
|
|
|
set(_AX_PLATFORM_SPECIFIC_HEADER
|
|
|
|
${_AX_PLATFORM_SPECIFIC_HEADER}
|
2023-09-02 19:56:50 +08:00
|
|
|
platform/ios/ES3Renderer-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-09-02 19:56:50 +08:00
|
|
|
platform/ios/ES3Renderer-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
|
2023-09-07 19:32:06 +08:00
|
|
|
platform/GLViewImpl.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
|
2023-09-07 19:32:06 +08:00
|
|
|
platform/GLViewImpl.cpp
|
2019-11-23 20:27:39 +08:00
|
|
|
)
|
2023-09-01 16:31:14 +08:00
|
|
|
elseif(EMSCRIPTEN)
|
|
|
|
include_directories(
|
|
|
|
PUBLIC "${_AX_ROOT}/thirdparty/angle/include"
|
|
|
|
PUBLIC "${_AX_ROOT}/core"
|
|
|
|
)
|
|
|
|
set(_AX_PLATFORM_SPECIFIC_HEADER
|
2023-09-05 22:17:18 +08:00
|
|
|
platform/wasm/Application-wasm.h
|
|
|
|
platform/wasm/GL-wasm.h
|
|
|
|
platform/wasm/StdC-wasm.h
|
|
|
|
platform/wasm/FileUtils-wasm.h
|
|
|
|
platform/wasm/PlatformDefine-wasm.h
|
2023-09-07 19:32:06 +08:00
|
|
|
platform/GLViewImpl.h # wasm can share GLviewImpl-desktop based on GLFW
|
2023-09-01 16:31:14 +08:00
|
|
|
)
|
|
|
|
set(_AX_PLATFORM_SPECIFIC_SRC
|
2023-09-05 22:17:18 +08:00
|
|
|
platform/wasm/FileUtils-wasm.cpp
|
|
|
|
platform/wasm/Common-wasm.cpp
|
|
|
|
platform/wasm/Application-wasm.cpp
|
|
|
|
platform/wasm/Device-wasm.cpp
|
2023-09-07 19:32:06 +08:00
|
|
|
platform/GLViewImpl.cpp
|
2023-09-01 16:31:14 +08:00
|
|
|
)
|
2023-09-15 19:33:25 +08:00
|
|
|
if (AX_WASM_ENABLE_DEVTOOLS)
|
|
|
|
list(APPEND _AX_PLATFORM_SPECIFIC_SRC platform/wasm/devtools-wasm.cpp)
|
|
|
|
endif()
|
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
|
2023-09-02 19:56:50 +08:00
|
|
|
platform/IFileStream.h
|
2023-06-11 13:08:08 +08:00
|
|
|
platform/FileStream.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
|
2019-11-23 20:27:39 +08:00
|
|
|
)
|