mirror of https://github.com/axmolengine/axmol.git
133 lines
5.9 KiB
CMake
133 lines
5.9 KiB
CMake
|
#/****************************************************************************
|
||
|
# Copyright (c) 2014-2017 Chukong Technologies Inc.
|
||
|
#
|
||
|
# http://www.cocos2d-x.org
|
||
|
#
|
||
|
# 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.
|
||
|
# ****************************************************************************/
|
||
|
|
||
|
set(SIMULATOR_LIB_PATH ${COCOS2DX_ROOT_PATH}/tools/simulator/libsimulator/lib)
|
||
|
|
||
|
if(MACOSX)
|
||
|
# add define for mac os GLFW_EXPOSE_NATIVE_NSGL
|
||
|
add_definitions(-DGLFW_EXPOSE_NATIVE_NSGL)
|
||
|
elseif(WINDOWS)
|
||
|
add_definitions(-DUNICODE -D_UNICODE)
|
||
|
add_definitions(-D_USRLIBSIMSTATIC -DGLFW_EXPOSE_NATIVE_WIN32 -D_SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS)
|
||
|
include_directories(${SIMULATOR_LIB_PATH}/../proj.win32)
|
||
|
endif()
|
||
|
|
||
|
if(WIN32)
|
||
|
set(PLATFORM_SRC
|
||
|
${SIMULATOR_LIB_PATH}/../proj.win32/Runtime_win32.cpp
|
||
|
${SIMULATOR_LIB_PATH}/../proj.win32/stdafx.cpp
|
||
|
${SIMULATOR_LIB_PATH}/platform/win32/DeviceEx-win32.cpp
|
||
|
${SIMULATOR_LIB_PATH}/platform/win32/PlayerEditBoxServiceWin.cpp
|
||
|
${SIMULATOR_LIB_PATH}/platform/win32/PlayerFileDialogServiceWin.cpp
|
||
|
${SIMULATOR_LIB_PATH}/platform/win32/PlayerMenuServiceWin.cpp
|
||
|
${SIMULATOR_LIB_PATH}/platform/win32/PlayerMessageBoxServiceWin.cpp
|
||
|
${SIMULATOR_LIB_PATH}/platform/win32/PlayerTaskServiceWin.cpp
|
||
|
${SIMULATOR_LIB_PATH}/platform/win32/PlayerWin.cpp
|
||
|
# ${SIMULATOR_LIB_PATH}/platform/win32/SimulatorWin.cpp
|
||
|
)
|
||
|
elseif(MACOSX)
|
||
|
set(PLATFORM_SRC
|
||
|
${SIMULATOR_LIB_PATH}/platform/mac/DeviceEx-mac.mm
|
||
|
${SIMULATOR_LIB_PATH}/platform/mac/PlayerEditBoxServiceMac.mm
|
||
|
${SIMULATOR_LIB_PATH}/platform/mac/PlayerFileDialogServiceMac.mm
|
||
|
${SIMULATOR_LIB_PATH}/platform/mac/PlayerMac.mm
|
||
|
${SIMULATOR_LIB_PATH}/platform/mac/PlayerMenuServiceMac.mm
|
||
|
${SIMULATOR_LIB_PATH}/platform/mac/PlayerMessageBoxServiceMac.mm
|
||
|
${SIMULATOR_LIB_PATH}/platform/mac/PlayerTaskServiceMac.mm
|
||
|
${SIMULATOR_LIB_PATH}/platform/mac/Runtime_ios-mac.mm
|
||
|
${SIMULATOR_LIB_PATH}/platform/mac/openudid/OpenUDIDMac.m
|
||
|
)
|
||
|
endif()
|
||
|
|
||
|
set(PROTOBUF_SRC
|
||
|
${SIMULATOR_LIB_PATH}/protobuf-lite/google/protobuf/extension_set.cc
|
||
|
${SIMULATOR_LIB_PATH}/protobuf-lite/google/protobuf/generated_message_util.cc
|
||
|
${SIMULATOR_LIB_PATH}/protobuf-lite/google/protobuf/io/coded_stream.cc
|
||
|
${SIMULATOR_LIB_PATH}/protobuf-lite/google/protobuf/io/zero_copy_stream.cc
|
||
|
${SIMULATOR_LIB_PATH}/protobuf-lite/google/protobuf/io/zero_copy_stream_impl_lite.cc
|
||
|
${SIMULATOR_LIB_PATH}/protobuf-lite/google/protobuf/message_lite.cc
|
||
|
${SIMULATOR_LIB_PATH}/protobuf-lite/google/protobuf/repeated_field.cc
|
||
|
${SIMULATOR_LIB_PATH}/protobuf-lite/google/protobuf/stubs/atomicops_internals_x86_gcc.cc
|
||
|
${SIMULATOR_LIB_PATH}/protobuf-lite/google/protobuf/stubs/atomicops_internals_x86_msvc.cc
|
||
|
${SIMULATOR_LIB_PATH}/protobuf-lite/google/protobuf/stubs/common.cc
|
||
|
${SIMULATOR_LIB_PATH}/protobuf-lite/google/protobuf/stubs/once.cc
|
||
|
${SIMULATOR_LIB_PATH}/protobuf-lite/google/protobuf/stubs/stringprintf.cc
|
||
|
${SIMULATOR_LIB_PATH}/protobuf-lite/google/protobuf/wire_format_lite.cc
|
||
|
)
|
||
|
|
||
|
set(SIMELATOR_SRC
|
||
|
${SIMULATOR_LIB_PATH}/network/CCHTTPRequest.cpp
|
||
|
${SIMULATOR_LIB_PATH}/ProjectConfig/ProjectConfig.cpp
|
||
|
${SIMULATOR_LIB_PATH}/ProjectConfig/SimulatorConfig.cpp
|
||
|
${SIMULATOR_LIB_PATH}/AppEvent.cpp
|
||
|
${SIMULATOR_LIB_PATH}/AppLang.cpp
|
||
|
${SIMULATOR_LIB_PATH}/PlayerMenuServiceProtocol.cpp
|
||
|
${SIMULATOR_LIB_PATH}/PlayerProtocol.cpp
|
||
|
${SIMULATOR_LIB_PATH}/PlayerServiceProtocol.cpp
|
||
|
${SIMULATOR_LIB_PATH}/PlayerSettings.cpp
|
||
|
${SIMULATOR_LIB_PATH}/PlayerTaskServiceProtocol.cpp
|
||
|
${SIMULATOR_LIB_PATH}/PlayerUtils.cpp
|
||
|
${SIMULATOR_LIB_PATH}/runtime/ConfigParser.cpp
|
||
|
${SIMULATOR_LIB_PATH}/runtime/ConnectWaitLayer.cpp
|
||
|
${SIMULATOR_LIB_PATH}/runtime/ConsoleCommand.cpp
|
||
|
${SIMULATOR_LIB_PATH}/runtime/FileServer.cpp
|
||
|
${SIMULATOR_LIB_PATH}/runtime/Landscape_png.cpp
|
||
|
${SIMULATOR_LIB_PATH}/runtime/PlayDisable_png.cpp
|
||
|
${SIMULATOR_LIB_PATH}/runtime/PlayEnable_png.cpp
|
||
|
${SIMULATOR_LIB_PATH}/runtime/Portrait_png.cpp
|
||
|
${SIMULATOR_LIB_PATH}/runtime/Protos.pb.cc
|
||
|
${SIMULATOR_LIB_PATH}/runtime/Runtime.cpp
|
||
|
${SIMULATOR_LIB_PATH}/runtime/RuntimeCCSImpl.cpp
|
||
|
${SIMULATOR_LIB_PATH}/runtime/RuntimeProtocol.cpp
|
||
|
${SIMULATOR_LIB_PATH}/runtime/Shine_png.cpp
|
||
|
${SIMULATOR_LIB_PATH}/runtime/VisibleRect.cpp
|
||
|
${PROTOBUF_SRC}
|
||
|
${PLATFORM_SRC}
|
||
|
)
|
||
|
|
||
|
include_directories(
|
||
|
${SIMULATOR_LIB_PATH}
|
||
|
${SIMULATOR_LIB_PATH}/platform/${PLATFORM_FOLDER}
|
||
|
${SIMULATOR_LIB_PATH}/protobuf-lite
|
||
|
${SIMULATOR_LIB_PATH}/runtime
|
||
|
${COCOS2DX_ROOT_PATH}/cocos/editor-support
|
||
|
)
|
||
|
|
||
|
add_library(simulator STATIC
|
||
|
${SIMELATOR_SRC}
|
||
|
)
|
||
|
|
||
|
target_use_simulator_depend_libs(simulator)
|
||
|
|
||
|
set_target_properties(simulator
|
||
|
PROPERTIES
|
||
|
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
|
||
|
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
|
||
|
FOLDER "Internal"
|
||
|
)
|
||
|
|
||
|
if(XCODE OR VS)
|
||
|
cocos_mark_code_files("simulator")
|
||
|
endif()
|