Refactored CMake build script to separate reusable commands and macros into module for easy inclusion in external project. Added option to build Urho3D static/shared library (currently only works in Linux GCC). Added new FindUrho3D.cmake module for setting up Urho3D as external library in other user-defined project.
This commit is contained in:
Родитель
8a94f363ee
Коммит
256eb5ac78
306
CMakeLists.txt
306
CMakeLists.txt
|
@ -1,12 +1,24 @@
|
|||
include (CheckIncludeFiles)
|
||||
|
||||
# Disable unnecessary build types
|
||||
set (CMAKE_CONFIGURATION_TYPES "RelWithDebInfo;Debug;Release" CACHE STRING "Configurations" FORCE)
|
||||
|
||||
# Set the build type if not explicitly set, for single-configuration generator only
|
||||
if (NOT MSVC AND NOT CMAKE_GENERATOR STREQUAL "Xcode" AND NOT CMAKE_BUILD_TYPE)
|
||||
set (CMAKE_BUILD_TYPE "RelWithDebInfo")
|
||||
endif ()
|
||||
#
|
||||
# Copyright (c) 2008-2013 the Urho3D project.
|
||||
#
|
||||
# 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 project name
|
||||
project (Urho3D)
|
||||
|
@ -21,51 +33,11 @@ endif ()
|
|||
# Add cmake modules search path
|
||||
set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
|
||||
|
||||
# Enable 64-bit build. Disabled by default. On Visual Studio, depends on the generator used
|
||||
if (NOT MSVC)
|
||||
# set (ENABLE_64BIT 1)
|
||||
else ()
|
||||
if (CMAKE_GENERATOR MATCHES "Win64")
|
||||
set (ENABLE_64BIT 1)
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
# Enable SSE instruction set. Requires Pentium III or Athlon XP processor at minimum.
|
||||
set (ENABLE_SSE 1)
|
||||
add_definitions (-DENABLE_SSE)
|
||||
|
||||
# Enable structured exception handling and minidumps on MSVC only.
|
||||
if (MSVC)
|
||||
set (ENABLE_MINIDUMPS 1)
|
||||
add_definitions (-DENABLE_MINIDUMPS)
|
||||
endif ()
|
||||
|
||||
# Enable file watcher support for automatic resource reloads.
|
||||
add_definitions (-DENABLE_FILEWATCHER)
|
||||
|
||||
# Enable profiling. If disabled, autoprofileblocks become no-ops and the Profiler subsystem is not
|
||||
# instantiated.
|
||||
add_definitions (-DENABLE_PROFILING)
|
||||
|
||||
# Enable logging. If disabled, LOGXXXX macros become no-ops and the Log subsystem is not instantiated.
|
||||
add_definitions (-DENABLE_LOGGING)
|
||||
|
||||
# If not on MSVC, enable use of OpenGL instead of Direct3D9 (either not compiling on Windows or
|
||||
# with a compiler that may not have an up-to-date DirectX SDK). This can also be unconditionally
|
||||
# enabled, but Windows graphics card drivers are usually better optimized for Direct3D.
|
||||
if (NOT MSVC)
|
||||
set (USE_OPENGL 1)
|
||||
endif ()
|
||||
if (USE_OPENGL)
|
||||
add_definitions (-DUSE_OPENGL)
|
||||
endif ()
|
||||
|
||||
# If not on Windows, enable Unix mode for kNet library.
|
||||
if (NOT WIN32)
|
||||
add_definitions (-DUNIX)
|
||||
endif ()
|
||||
# Include Urho3D cmake module
|
||||
include (Urho3D-CMake-magic)
|
||||
|
||||
# Check existence of stdint.h for LibCpuId
|
||||
include (CheckIncludeFiles)
|
||||
CHECK_INCLUDE_FILES (stdint.h HAVE_STDINT_H)
|
||||
if (HAVE_STDINT_H)
|
||||
add_definitions(-DHAVE_STDINT_H)
|
||||
|
@ -77,203 +49,10 @@ if (NOT IOS AND NOT ANDROID AND NOT RASPI AND USE_OPENGL)
|
|||
add_definitions(-DGLEW_NO_GLU)
|
||||
endif ()
|
||||
|
||||
# Platform and compiler specific options
|
||||
if (IOS)
|
||||
# IOS-specific setup
|
||||
add_definitions (-DIOS)
|
||||
set (CMAKE_OSX_ARCHITECTURES $(ARCHS_STANDARD_32_BIT))
|
||||
set (CMAKE_XCODE_EFFECTIVE_PLATFORMS "-iphoneos;-iphonesimulator")
|
||||
set (MACOSX_BUNDLE_GUI_IDENTIFIER "com.googlecode.urho3d")
|
||||
set (CMAKE_OSX_SYSROOT "iphoneos") # Set to "Latest iOS"
|
||||
elseif (CMAKE_GENERATOR STREQUAL "Xcode")
|
||||
# MacOSX-Xcode-specific setup
|
||||
if (NOT ENABLE_64BIT)
|
||||
set (CMAKE_OSX_ARCHITECTURES $(ARCHS_STANDARD_32_BIT))
|
||||
endif ()
|
||||
set (CMAKE_OSX_SYSROOT "") # Set to "Current OS X"
|
||||
#set (CMAKE_OSX_SYSROOT "macosx") # Set to "Latest OS X"
|
||||
endif ()
|
||||
if (MSVC)
|
||||
# Visual Studio-specific setup
|
||||
add_definitions (-D_CRT_SECURE_NO_WARNINGS)
|
||||
set (CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /MTd")
|
||||
set (CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELEASE} /MT /fp:fast /Zi /GS-")
|
||||
set (CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELWITHDEBINFO}")
|
||||
set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MTd")
|
||||
set (CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELEASE} /MT /fp:fast /Zi /GS- /D _SECURE_SCL=0")
|
||||
set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")
|
||||
# SSE flag is redundant if already compiling as 64bit
|
||||
if (ENABLE_SSE AND NOT ENABLE_64BIT)
|
||||
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /arch:SSE")
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /arch:SSE")
|
||||
endif ()
|
||||
set (CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /OPT:REF /OPT:ICF /DEBUG")
|
||||
set (CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /OPT:REF /OPT:ICF")
|
||||
else ()
|
||||
# GCC-specific setup
|
||||
if (ANDROID)
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-invalid-offsetof")
|
||||
elseif (NOT IOS)
|
||||
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O2 -ffast-math")
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-invalid-offsetof -O2 -ffast-math")
|
||||
if (RASPI)
|
||||
add_definitions (-DRASPI)
|
||||
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pipe -mcpu=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard")
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pipe -mcpu=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard")
|
||||
elseif (ENABLE_64BIT)
|
||||
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m64")
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m64")
|
||||
else ()
|
||||
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m32")
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m32")
|
||||
if (ENABLE_SSE)
|
||||
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -msse")
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse")
|
||||
endif ()
|
||||
endif ()
|
||||
if (WIN32)
|
||||
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -static-libgcc")
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -static-libstdc++ -static-libgcc")
|
||||
endif ()
|
||||
endif ()
|
||||
set (CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -D_DEBUG")
|
||||
set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -D_DEBUG")
|
||||
endif ()
|
||||
|
||||
# Macro for precompiled headers
|
||||
macro (enable_pch)
|
||||
if (MSVC)
|
||||
foreach(FILE ${SOURCE_FILES})
|
||||
if (${FILE} MATCHES "[A-Za-z0-9 _/]*[.]cpp")
|
||||
if (${FILE} MATCHES "Precompiled.cpp$")
|
||||
set_source_files_properties(${FILE} PROPERTIES COMPILE_FLAGS "/YcPrecompiled.h")
|
||||
else ()
|
||||
set_source_files_properties(${FILE} PROPERTIES COMPILE_FLAGS "/YuPrecompiled.h")
|
||||
endif ()
|
||||
endif ()
|
||||
endforeach ()
|
||||
endif ()
|
||||
endmacro ()
|
||||
|
||||
# Macro for setting up dependency lib for compilation and linking of a target
|
||||
macro (setup_target)
|
||||
# Include directories
|
||||
include_directories (${LIBS} ${INCLUDE_DIRS_ONLY})
|
||||
# Link libraries
|
||||
string (REGEX REPLACE "\\.\\./|ThirdParty/|Engine/|Extras/|/Include|/include|/src" "" STRIP_LIBS "${LIBS};${LINK_LIBS_ONLY}")
|
||||
target_link_libraries (${TARGET_NAME} ${STRIP_LIBS})
|
||||
endmacro ()
|
||||
|
||||
# Macro for setting up a library target
|
||||
macro (setup_library)
|
||||
add_library (${TARGET_NAME} STATIC ${SOURCE_FILES})
|
||||
setup_target ()
|
||||
endmacro ()
|
||||
|
||||
# Macro for setting up an executable target
|
||||
macro (setup_executable)
|
||||
add_executable (${TARGET_NAME} ${EXE_TYPE} ${SOURCE_FILES})
|
||||
setup_target ()
|
||||
if (MSVC)
|
||||
add_custom_command (TARGET ${TARGET_NAME} POST_BUILD COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different \"$(TARGETPATH)\" ${PROJECT_SOURCE_DIR}/Bin)
|
||||
add_custom_command (TARGET ${TARGET_NAME} POST_BUILD COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different \"$(TARGETDIR)$(TARGETNAME).pdb\" ${PROJECT_SOURCE_DIR}/Bin)
|
||||
elseif (IOS)
|
||||
set_target_properties (${TARGET_NAME} PROPERTIES XCODE_ATTRIBUTE_TARGETED_DEVICE_FAMILY "1,2")
|
||||
else ()
|
||||
get_target_property (EXECUTABLE_NAME ${TARGET_NAME} LOCATION)
|
||||
if (CMAKE_CROSSCOMPILING)
|
||||
file (MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/Bin-CC)
|
||||
add_custom_command (TARGET ${TARGET_NAME} POST_BUILD COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different ${EXECUTABLE_NAME} ${CMAKE_BINARY_DIR}/Bin-CC)
|
||||
if (SCP_TO_TARGET)
|
||||
add_custom_command (TARGET ${TARGET_NAME} POST_BUILD COMMAND scp ${EXECUTABLE_NAME} ${SCP_TO_TARGET} || exit 0)
|
||||
endif ()
|
||||
else ()
|
||||
add_custom_command (TARGET ${TARGET_NAME} POST_BUILD COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different ${EXECUTABLE_NAME} ${PROJECT_SOURCE_DIR}/Bin)
|
||||
endif ()
|
||||
endif ()
|
||||
endmacro ()
|
||||
|
||||
# Macro for setting up an executable target with resources to copy
|
||||
macro (setup_main_executable)
|
||||
# Define resource files
|
||||
if (APPLE)
|
||||
set (RESOURCE_FILES ${PROJECT_SOURCE_DIR}/Bin/CoreData ${PROJECT_SOURCE_DIR}/Bin/Data)
|
||||
set_source_files_properties(${RESOURCE_FILES} PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
|
||||
set (SOURCE_FILES ${SOURCE_FILES} ${RESOURCE_FILES})
|
||||
endif ()
|
||||
|
||||
# Setup target
|
||||
if (WIN32)
|
||||
set (EXE_TYPE WIN32)
|
||||
elseif (IOS)
|
||||
set (CMAKE_EXE_LINKER_FLAGS "-framework AudioToolbox -framework CoreAudio -framework CoreGraphics -framework Foundation -framework OpenGLES -framework QuartzCore -framework UIKit")
|
||||
set (EXE_TYPE MACOSX_BUNDLE)
|
||||
elseif (APPLE)
|
||||
set (CMAKE_EXE_LINKER_FLAGS "-framework AudioUnit -framework Carbon -framework Cocoa -framework CoreAudio -framework ForceFeedback -framework IOKit -framework OpenGL -framework CoreServices")
|
||||
endif ()
|
||||
if (NOT ANDROID)
|
||||
setup_executable ()
|
||||
else ()
|
||||
add_library (${TARGET_NAME} SHARED ${SOURCE_FILES})
|
||||
setup_target ()
|
||||
# Strip the output shared library
|
||||
get_target_property (EXECUTABLE_NAME ${TARGET_NAME} LOCATION)
|
||||
add_custom_command (TARGET ${TARGET_NAME} POST_BUILD COMMAND ${CMAKE_STRIP} ${EXECUTABLE_NAME})
|
||||
endif ()
|
||||
|
||||
# Define a custom target to check for resource modification
|
||||
if (IOS)
|
||||
get_target_property (TARGET_LOC ${TARGET_NAME} LOCATION)
|
||||
string (REGEX REPLACE "/Contents/MacOS" "" TARGET_LOC ${TARGET_LOC}) # The regex replacement is temporary workaround to correct the wrong location caused by CMake/Xcode generator bug
|
||||
add_custom_target (RESOURCE_CHECK_${TARGET_NAME} ALL
|
||||
\(\( `find ${RESOURCE_FILES} -newer ${TARGET_LOC} 2>/dev/null |wc -l` \)\) && touch -cm ${SOURCE_FILES} || exit 0
|
||||
COMMENT "This is a dummy target to check for changes in the Resource folders"
|
||||
)
|
||||
add_dependencies (${TARGET_NAME} RESOURCE_CHECK_${TARGET_NAME})
|
||||
endif ()
|
||||
endmacro ()
|
||||
|
||||
# Add SDL as a global include directory
|
||||
include_directories (ThirdParty/SDL/include)
|
||||
|
||||
# If using Windows and not OpenGL, find DirectX SDK include & library directories
|
||||
# Based on realXtend Tundra CMake build system (https://github.com/realXtend/naali)
|
||||
if (WIN32 AND NOT USE_OPENGL)
|
||||
find_path(DirectX_INCLUDE_DIR d3dx9.h
|
||||
"$ENV{DIRECTX_ROOT}/Include"
|
||||
"$ENV{DXSDK_DIR}/Include"
|
||||
"C:/apps_x86/Microsoft DirectX SDK*/Include"
|
||||
"C:/Program Files (x86)/Microsoft DirectX SDK*/Include"
|
||||
"C:/apps/Microsoft DirectX SDK*/Include"
|
||||
"C:/Program Files/Microsoft DirectX SDK*/Include")
|
||||
|
||||
if (CMAKE_CL_64)
|
||||
set (DirectX_LIBRARY_PATHS
|
||||
"$ENV{DIRECTX_ROOT}/Lib/x64"
|
||||
"$ENV{DXSDK_DIR}/Lib/x64"
|
||||
"C:/Program Files (x86)/Microsoft DirectX SDK*/Lib/x64"
|
||||
"C:/Program Files/Microsoft DirectX SDK*/Lib/x64")
|
||||
else ()
|
||||
set (DirectX_LIBRARY_PATHS
|
||||
"$ENV{DIRECTX_ROOT}/Lib"
|
||||
"$ENV{DIRECTX_ROOT}/Lib/x86"
|
||||
"$ENV{DXSDK_DIR}/Lib"
|
||||
"$ENV{DXSDK_DIR}/Lib/x86"
|
||||
"C:/Program Files (x86)/Microsoft DirectX SDK*/Lib"
|
||||
"C:/Program Files (x86)/Microsoft DirectX SDK*/Lib/x86"
|
||||
"C:/Program Files/Microsoft DirectX SDK*/Lib"
|
||||
"C:/Program Files/Microsoft DirectX SDK*/Lib/x86")
|
||||
endif ()
|
||||
|
||||
find_path (DirectX_LIBRARY_DIR d3d9.lib ${DirectX_LIBRARY_PATHS})
|
||||
|
||||
if (DirectX_INCLUDE_DIR AND DirectX_LIBRARY_DIR)
|
||||
include_directories (${DirectX_INCLUDE_DIR})
|
||||
link_directories (${DirectX_LIBRARY_DIR})
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
# Add projects
|
||||
# Add targets
|
||||
add_subdirectory (Engine/Audio)
|
||||
add_subdirectory (Engine/Container)
|
||||
add_subdirectory (Engine/Core)
|
||||
|
@ -328,6 +107,8 @@ if (NOT IOS AND NOT ANDROID)
|
|||
endif ()
|
||||
add_subdirectory (ThirdParty/LibCpuId)
|
||||
endif ()
|
||||
|
||||
# Urho3D tools
|
||||
if (ENABLE_TOOLS)
|
||||
add_subdirectory (ThirdParty/Assimp)
|
||||
add_subdirectory (Tools/AssetImporter)
|
||||
|
@ -337,23 +118,30 @@ if (NOT IOS AND NOT ANDROID)
|
|||
add_subdirectory (Tools/ScriptCompiler)
|
||||
add_subdirectory (Tools/DocConverter)
|
||||
endif ()
|
||||
|
||||
# Urho3D library
|
||||
if (ENABLE_LIBRARY)
|
||||
add_subdirectory (Urho3D/lib)
|
||||
endif ()
|
||||
|
||||
# Urho3D samples
|
||||
if (ENABLE_SAMPLES)
|
||||
add_subdirectory (Samples)
|
||||
endif ()
|
||||
|
||||
# Urho3D extras
|
||||
# Todo: CharacterDemo will be moved to Samples
|
||||
if (ENABLE_EXTRAS)
|
||||
add_subdirectory (Extras/OgreBatchConverter)
|
||||
add_subdirectory (Extras/CharacterDemo)
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
# Urho3D non-GL tools
|
||||
if (NOT USE_OPENGL AND ENABLE_TOOLS)
|
||||
add_subdirectory (ThirdParty/MojoShader)
|
||||
add_subdirectory (Tools/ShaderCompiler)
|
||||
endif ()
|
||||
|
||||
# Urho3D samples
|
||||
if (ENABLE_SAMPLES AND NOT IOS AND NOT ANDROID)
|
||||
add_subdirectory (Samples)
|
||||
endif ()
|
||||
|
||||
# Urho3D extras
|
||||
# Todo: CharacterDemo will be moved to Samples
|
||||
if (ENABLE_EXTRAS AND NOT IOS AND NOT ANDROID)
|
||||
add_subdirectory (Extras/OgreBatchConverter)
|
||||
add_subdirectory (Extras/CharacterDemo)
|
||||
endif ()
|
||||
|
||||
add_subdirectory (Urho3D)
|
||||
# Urho3D main app
|
||||
add_subdirectory (Urho3D/bin)
|
||||
|
|
|
@ -1,3 +1,25 @@
|
|||
#
|
||||
# Copyright (c) 2008-2013 the Urho3D project.
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
# Define target name
|
||||
set (TARGET_NAME Audio)
|
||||
|
||||
|
|
|
@ -1,3 +1,25 @@
|
|||
#
|
||||
# Copyright (c) 2008-2013 the Urho3D project.
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
# Define target name
|
||||
set (TARGET_NAME Container)
|
||||
|
||||
|
|
|
@ -1,3 +1,25 @@
|
|||
#
|
||||
# Copyright (c) 2008-2013 the Urho3D project.
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
# Define target name
|
||||
set (TARGET_NAME Core)
|
||||
|
||||
|
@ -14,16 +36,6 @@ if (NOT IOS AND NOT ANDROID AND NOT RASPI)
|
|||
set (LINK_LIBS_ONLY LibCpuId)
|
||||
endif ()
|
||||
|
||||
if (WIN32)
|
||||
set (LINK_LIBS_ONLY ${LINK_LIBS_ONLY} winmm.lib)
|
||||
if (ENABLE_MINIDUMPS)
|
||||
set (LINK_LIBS_ONLY ${LINK_LIBS_ONLY} dbghelp.lib)
|
||||
endif ()
|
||||
elseif (NOT ANDROID)
|
||||
set (LINK_LIBS_ONLY ${LINK_LIBS_ONLY} pthread)
|
||||
endif ()
|
||||
|
||||
# Setup target
|
||||
enable_pch ()
|
||||
setup_library ()
|
||||
|
||||
|
|
|
@ -40,10 +40,6 @@ Application::Application(Context* context) :
|
|||
engine_ = new Engine(context);
|
||||
}
|
||||
|
||||
Application::~Application()
|
||||
{
|
||||
}
|
||||
|
||||
int Application::Run()
|
||||
{
|
||||
try
|
||||
|
|
|
@ -39,9 +39,6 @@ class Application : public Object
|
|||
public:
|
||||
/// Construct. Parse default engine parameters from the command line, and create the engine in an uninitialized state.
|
||||
Application(Context* context);
|
||||
/// Destruct.
|
||||
~Application();
|
||||
|
||||
/// Initialize the engine and run the main loop, then return the application exit code. Catch out-of-memory exceptions while running.
|
||||
int Run();
|
||||
|
||||
|
@ -74,4 +71,4 @@ int RunApplication() \
|
|||
} \
|
||||
DEFINE_MAIN(RunApplication());
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,3 +1,25 @@
|
|||
#
|
||||
# Copyright (c) 2008-2013 the Urho3D project.
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
# Define target name
|
||||
set (TARGET_NAME Engine)
|
||||
|
||||
|
|
|
@ -1,3 +1,25 @@
|
|||
#
|
||||
# Copyright (c) 2008-2013 the Urho3D project.
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
# Define target name
|
||||
set (TARGET_NAME Graphics)
|
||||
|
||||
|
@ -20,19 +42,8 @@ set (LIBS ../Container ../Core ../IO ../Math ../Resource ../Scene)
|
|||
set (INCLUDE_DIRS_ONLY .)
|
||||
set (LINK_LIBS_ONLY SDL)
|
||||
|
||||
if (USE_OPENGL)
|
||||
if (NOT IOS AND NOT ANDROID AND NOT RASPI)
|
||||
set (LIBS ${LIBS} ../../ThirdParty/GLEW)
|
||||
endif ()
|
||||
if (WIN32)
|
||||
set (LINK_LIBS_ONLY ${LINK_LIBS_ONLY} opengl32)
|
||||
elseif (ANDROID OR RASPI)
|
||||
set (LINK_LIBS_ONLY ${LINK_LIBS_ONLY} GLESv1_CM GLESv2)
|
||||
elseif (NOT APPLE)
|
||||
set (LINK_LIBS_ONLY ${LINK_LIBS_ONLY} GL)
|
||||
endif ()
|
||||
else ()
|
||||
set (LINK_LIBS_ONLY ${LINK_LIBS_ONLY} d3d9)
|
||||
if (USE_OPENGL AND NOT IOS AND NOT ANDROID AND NOT RASPI)
|
||||
set (LIBS ${LIBS} ../../ThirdParty/GLEW)
|
||||
endif ()
|
||||
|
||||
# Setup target
|
||||
|
|
|
@ -1,3 +1,25 @@
|
|||
#
|
||||
# Copyright (c) 2008-2013 the Urho3D project.
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
# Define target name
|
||||
set (TARGET_NAME IO)
|
||||
|
||||
|
|
|
@ -1,3 +1,25 @@
|
|||
#
|
||||
# Copyright (c) 2008-2013 the Urho3D project.
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
# Define target name
|
||||
set (TARGET_NAME Input)
|
||||
|
||||
|
|
|
@ -1,3 +1,25 @@
|
|||
#
|
||||
# Copyright (c) 2008-2013 the Urho3D project.
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
# Define target name
|
||||
set (TARGET_NAME Math)
|
||||
|
||||
|
|
|
@ -1,3 +1,25 @@
|
|||
#
|
||||
# Copyright (c) 2008-2013 the Urho3D project.
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
# Define target name
|
||||
set (TARGET_NAME Navigation)
|
||||
|
||||
|
|
|
@ -1,3 +1,25 @@
|
|||
#
|
||||
# Copyright (c) 2008-2013 the Urho3D project.
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
# Define target name
|
||||
set (TARGET_NAME Network)
|
||||
|
||||
|
|
|
@ -1,3 +1,25 @@
|
|||
#
|
||||
# Copyright (c) 2008-2013 the Urho3D project.
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
# Define target name
|
||||
set (TARGET_NAME Physics)
|
||||
|
||||
|
|
|
@ -1,3 +1,25 @@
|
|||
#
|
||||
# Copyright (c) 2008-2013 the Urho3D project.
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
# Define target name
|
||||
set (TARGET_NAME Resource)
|
||||
|
||||
|
|
|
@ -1,3 +1,25 @@
|
|||
#
|
||||
# Copyright (c) 2008-2013 the Urho3D project.
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
# Define target name
|
||||
set (TARGET_NAME Scene)
|
||||
|
||||
|
|
|
@ -1,3 +1,25 @@
|
|||
#
|
||||
# Copyright (c) 2008-2013 the Urho3D project.
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
# Define target name
|
||||
set (TARGET_NAME Script)
|
||||
|
||||
|
|
|
@ -1,3 +1,25 @@
|
|||
#
|
||||
# Copyright (c) 2008-2013 the Urho3D project.
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
# Define target name
|
||||
set (TARGET_NAME UI)
|
||||
|
||||
|
|
|
@ -1,3 +1,25 @@
|
|||
#
|
||||
# Copyright (c) 2008-2013 the Urho3D project.
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
# Define target name
|
||||
set (TARGET_NAME CharacterDemo)
|
||||
|
||||
|
|
|
@ -1,3 +1,25 @@
|
|||
#
|
||||
# Copyright (c) 2008-2013 the Urho3D project.
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
# Define target name
|
||||
set (TARGET_NAME LuaScript)
|
||||
|
||||
|
|
|
@ -1,3 +1,25 @@
|
|||
#
|
||||
# Copyright (c) 2008-2013 the Urho3D project.
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
# Define target name
|
||||
set (TARGET_NAME OgreBatchConverter)
|
||||
|
||||
|
|
|
@ -1,23 +1,32 @@
|
|||
#
|
||||
# Copyright (c) 2008-2013 the Urho3D project.
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
# Define target name
|
||||
set (TARGET_NAME 01_HelloWorld)
|
||||
|
||||
# Define source files
|
||||
set (H_FILES ${H_FILES} HelloWorld.h)
|
||||
set (H_FILES HelloWorld.h)
|
||||
set (CPP_FILES HelloWorld.cpp)
|
||||
|
||||
set (SOURCE_FILES ${CPP_FILES} ${H_FILES})
|
||||
|
||||
# Define dependency libs
|
||||
set (LIBS ../../Engine/Container
|
||||
../../Engine/Core
|
||||
../../Engine/Engine
|
||||
../../Engine/Graphics
|
||||
../../Engine/Input
|
||||
../../Engine/IO
|
||||
../../Engine/Math
|
||||
../../Engine/Resource
|
||||
../../Engine/Scene
|
||||
../../Engine/UI)
|
||||
set (SOURCE_FILES ${CPP_FILES} ${H_FILES} ${COMMON_SAMPLE_H_FILES})
|
||||
|
||||
# Setup target with resource copying
|
||||
setup_main_executable ()
|
||||
|
|
|
@ -1,8 +1,40 @@
|
|||
# Add this as include dir
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
|
||||
#
|
||||
# Copyright (c) 2008-2013 the Urho3D project.
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
# Include common to all samples
|
||||
set (H_FILES "${CMAKE_CURRENT_SOURCE_DIR}/Sample.h" "${CMAKE_CURRENT_SOURCE_DIR}/Sample.inl")
|
||||
set (COMMON_SAMPLE_H_FILES "${CMAKE_CURRENT_SOURCE_DIR}/Sample.h" "${CMAKE_CURRENT_SOURCE_DIR}/Sample.inl")
|
||||
|
||||
# Define dependency libs
|
||||
set (LIBS ../../Engine/Container
|
||||
../../Engine/Core
|
||||
../../Engine/Engine
|
||||
../../Engine/Graphics
|
||||
../../Engine/Input
|
||||
../../Engine/IO
|
||||
../../Engine/Math
|
||||
../../Engine/Resource
|
||||
../../Engine/Scene
|
||||
../../Engine/UI)
|
||||
set (INCLUDE_DIRS_ONLY ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
# Add samples
|
||||
add_subdirectory(01_HelloWorld)
|
||||
add_subdirectory (01_HelloWorld)
|
||||
|
|
|
@ -41,10 +41,7 @@ elseif (ANDROID)
|
|||
else ()
|
||||
# On Linux, make sure development libraries exist, and use their include file directories
|
||||
if (RASPI)
|
||||
find_package (BCM_VC REQUIRED)
|
||||
include_directories (${BCM_VC_INCLUDE_DIR})
|
||||
link_directories (${BCM_VC_LIBRARIES})
|
||||
set (LINK_LIBS_ONLY bcm_host)
|
||||
file (GLOB VIDEO_DRIVER_C_FILES src/video/raspi/*.c)
|
||||
else ()
|
||||
find_package (OpenGL REQUIRED)
|
||||
|
@ -96,19 +93,10 @@ endif ()
|
|||
|
||||
file (GLOB H_FILES include/*.h)
|
||||
|
||||
# Define source files
|
||||
set_source_files_properties (${C_FILES} PROPERTIES LANGUAGE C)
|
||||
set_source_files_properties (${SYS_C_FILES} PROPERTIES LANGUAGE C)
|
||||
set (SOURCE_FILES ${C_FILES} ${SYS_C_FILES} ${H_FILES})
|
||||
|
||||
# Define target & libraries to link
|
||||
add_library (${TARGET_NAME} STATIC ${SOURCE_FILES})
|
||||
|
||||
if (WIN32)
|
||||
target_link_libraries (${TARGET_NAME} user32 gdi32 winmm imm32 ole32 oleaut32 version uuid)
|
||||
elseif (APPLE)
|
||||
target_link_libraries (${TARGET_NAME} dl pthread)
|
||||
elseif (ANDROID)
|
||||
target_link_libraries (${TARGET_NAME} dl log)
|
||||
else ()
|
||||
target_link_libraries (${TARGET_NAME} dl pthread rt ${LINK_LIBS_ONLY})
|
||||
endif ()
|
||||
# Setup target
|
||||
setup_library ()
|
||||
|
|
|
@ -11,3 +11,4 @@ set (INCLUDE_DIRS_ONLY ../../include ../../../Lua/src)
|
|||
|
||||
# Setup target
|
||||
setup_library ()
|
||||
adjust_library_name ()
|
||||
|
|
|
@ -1,3 +1,25 @@
|
|||
#
|
||||
# Copyright (c) 2008-2013 the Urho3D project.
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
# Define target name
|
||||
set (TARGET_NAME AssetImporter)
|
||||
|
||||
|
|
|
@ -1,3 +1,25 @@
|
|||
#
|
||||
# Copyright (c) 2008-2013 the Urho3D project.
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
# Define target name
|
||||
set (TARGET_NAME DocConverter)
|
||||
|
||||
|
|
|
@ -162,6 +162,7 @@ void ProcessFile(const String& fileName)
|
|||
line.Replace("Ö", "\x0c3\x096");
|
||||
line.Replace("\\n\\n", "<br>");
|
||||
line.Replace("\\n", "<br>");
|
||||
line.Replace("\\@", "@");
|
||||
|
||||
// Handle tables
|
||||
if (line.StartsWith("|---"))
|
||||
|
|
|
@ -1,3 +1,25 @@
|
|||
#
|
||||
# Copyright (c) 2008-2013 the Urho3D project.
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
# Define target name
|
||||
set (TARGET_NAME OgreImporter)
|
||||
|
||||
|
|
|
@ -1,3 +1,25 @@
|
|||
#
|
||||
# Copyright (c) 2008-2013 the Urho3D project.
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
# Define target name
|
||||
set (TARGET_NAME PackageTool)
|
||||
|
||||
|
|
|
@ -1,3 +1,25 @@
|
|||
#
|
||||
# Copyright (c) 2008-2013 the Urho3D project.
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
# Define target name
|
||||
set (TARGET_NAME RampGenerator)
|
||||
|
||||
|
|
|
@ -1,3 +1,25 @@
|
|||
#
|
||||
# Copyright (c) 2008-2013 the Urho3D project.
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
# Define target name
|
||||
set (TARGET_NAME ScriptCompiler)
|
||||
|
||||
|
|
|
@ -1,3 +1,25 @@
|
|||
#
|
||||
# Copyright (c) 2008-2013 the Urho3D project.
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
# Define target name
|
||||
set (TARGET_NAME ShaderCompiler)
|
||||
|
||||
|
|
|
@ -1,17 +0,0 @@
|
|||
# Define target name
|
||||
set (TARGET_NAME Urho3D)
|
||||
|
||||
# Define source files
|
||||
file (GLOB CPP_FILES *.cpp)
|
||||
file (GLOB H_FILES *.h)
|
||||
set (SOURCE_FILES ${CPP_FILES} ${H_FILES})
|
||||
|
||||
# Define dependency libs
|
||||
set (LIBS ../Engine/Container ../Engine/Core ../Engine/Engine ../Engine/IO ../Engine/Math ../Engine/Resource ../Engine/Script)
|
||||
|
||||
if (ENABLE_LUA)
|
||||
set (LIBS ${LIBS} ../Extras/LuaScript)
|
||||
endif ()
|
||||
|
||||
# Setup target with resource copying
|
||||
setup_main_executable ()
|
|
@ -0,0 +1,39 @@
|
|||
#
|
||||
# Copyright (c) 2008-2013 the Urho3D project.
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
# Define target name
|
||||
set (TARGET_NAME Urho3D)
|
||||
|
||||
# Define source files
|
||||
file (GLOB CPP_FILES *.cpp)
|
||||
file (GLOB H_FILES *.h)
|
||||
set (SOURCE_FILES ${CPP_FILES} ${H_FILES})
|
||||
|
||||
# Define dependency libs
|
||||
set (LIBS ../../Engine/Container ../../Engine/Core ../../Engine/Engine ../../Engine/IO ../../Engine/Math ../../Engine/Resource ../../Engine/Script)
|
||||
|
||||
if (ENABLE_LUA)
|
||||
set (LIBS ${LIBS} ../../Extras/LuaScript)
|
||||
endif ()
|
||||
|
||||
# Setup target with resource copying
|
||||
setup_main_executable ()
|
|
@ -0,0 +1,61 @@
|
|||
#
|
||||
# Copyright (c) 2008-2013 the Urho3D project.
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
# Define target name
|
||||
set (TARGET_NAME Urho3D_lib)
|
||||
if (ENABLE_LIBRARY MATCHES "SHARED|shared")
|
||||
set (LIB_TYPE SHARED)
|
||||
endif ()
|
||||
|
||||
# Define generated source files
|
||||
if (MSVC)
|
||||
add_custom_command (OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/svnversion.h
|
||||
COMMAND for /F %%v in ('svnversion -n ${PROJECT_SOURCE_DIR}') do echo const char* revision="%%v"\; >${CMAKE_CURRENT_BINARY_DIR}/svnversion.h DEPENDS Urho3D
|
||||
COMMENT "Generate subversion revision number")
|
||||
else ()
|
||||
add_custom_command (OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/svnversion.h
|
||||
COMMAND for v in `svnversion -n ${PROJECT_SOURCE_DIR}`\; do echo 'const char* revision="'$$v'"\;' >${CMAKE_CURRENT_BINARY_DIR}/svnversion.h\; done DEPENDS Urho3D
|
||||
COMMENT "Generate subversion revision number")
|
||||
endif ()
|
||||
|
||||
# Define source files
|
||||
file (GLOB CPP_FILES *.cpp)
|
||||
file (GLOB H_FILES *.h)
|
||||
set (SOURCE_FILES ${CPP_FILES} ${H_FILES} svnversion.h)
|
||||
|
||||
# Define dependency libs
|
||||
set (INCLUDE_DIRS_ONLY ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
# Setup target
|
||||
setup_library ()
|
||||
adjust_library_name ()
|
||||
|
||||
# Archive all the objects into this target
|
||||
if (MSVC)
|
||||
# todo: lib.exe /OUT:Urho3D.lib lib1.lib lib2.lib
|
||||
elseif (APPLE)
|
||||
# todo: find ../.. -type f -regex [\./]*Engine.*\\.o -o -regex [\./]*ThirdParty.*\\.o -o -regex [\./]*Extras/LuaScript.*\\.o
|
||||
else ()
|
||||
add_custom_command (TARGET ${TARGET_NAME} POST_BUILD
|
||||
COMMAND ${CMAKE_AR} r ${CMAKE_STATIC_LIBRARY_PREFIX}${LIB_NAME}${CMAKE_STATIC_LIBRARY_SUFFIX} `find ../.. -type f -regextype posix-egrep -regex [\\./]*\\\(Engine\\|ThirdParty\\|Extras/LuaScript\\\).*\\.o`
|
||||
COMMAND ${CMAKE_RANLIB} ${CMAKE_STATIC_LIBRARY_PREFIX}${LIB_NAME}${CMAKE_STATIC_LIBRARY_SUFFIX})
|
||||
endif ()
|
|
@ -0,0 +1,33 @@
|
|||
//
|
||||
// Copyright (c) 2008-2013 the Urho3D project.
|
||||
//
|
||||
// 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.
|
||||
//
|
||||
|
||||
#include "Revision.h"
|
||||
#include "svnversion.h"
|
||||
|
||||
namespace Urho3D
|
||||
{
|
||||
|
||||
const char* GetRevision() {
|
||||
return revision;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,31 @@
|
|||
//
|
||||
// Copyright (c) 2008-2013 the Urho3D project.
|
||||
//
|
||||
// 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.
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
namespace Urho3D
|
||||
{
|
||||
|
||||
/// Return subversion revision number as of the library build time.
|
||||
const char* GetRevision();
|
||||
|
||||
}
|
|
@ -24,21 +24,16 @@
|
|||
#
|
||||
# BCM_VC_FOUND
|
||||
# BCM_VC_INCLUDE_DIR
|
||||
# BCM_VC_LIBRARY_DIR
|
||||
# BCM_VC_LIBRARIES
|
||||
#
|
||||
|
||||
if (RASPI)
|
||||
set (BCM_VC_FOUND 0)
|
||||
|
||||
set (BCM_VC_INC_SEARCH_PATH
|
||||
/usr/include
|
||||
/opt/vc/include
|
||||
)
|
||||
|
||||
set (BCM_VC_LIB_SEARCH_PATH
|
||||
/usr/lib
|
||||
/opt/vc/lib
|
||||
)
|
||||
|
||||
# Only need to cater for raspbian as they are not in CMAKE_SYSTEM_PATH
|
||||
set (BCM_VC_INC_SEARCH_PATH /opt/vc/include)
|
||||
set (BCM_VC_LIB_SEARCH_PATH /opt/vc/lib)
|
||||
|
||||
# Assume all the other headers are installed at same relative path as bcm_host.h
|
||||
find_path (BCM_VC_INCLUDE_DIR bcm_host.h ${BCM_VC_INC_SEARCH_PATH})
|
||||
|
@ -48,6 +43,7 @@ if (RASPI)
|
|||
|
||||
if (BCM_VC_INCLUDE_DIR AND BCM_VC_LIBRARIES)
|
||||
set (BCM_VC_FOUND 1)
|
||||
get_filename_component (BCM_VC_LIBRARY_DIR ${BCM_VC_LIBRARIES} PATH)
|
||||
endif ()
|
||||
|
||||
if (BCM_VC_FOUND)
|
||||
|
|
|
@ -0,0 +1,78 @@
|
|||
#
|
||||
# Copyright (c) 2008-2013 the Urho3D project.
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
# Find Microsoft DirectX installation
|
||||
# The search paths are based on realXtend Tundra CMake build system (https://github.com/realXtend/naali)
|
||||
#
|
||||
# DIRECT3D_FOUND
|
||||
# DIRECT3D_INCLUDE_DIR
|
||||
# DIRECT3D_LIBRARY_DIR
|
||||
# DIRECT3D_LIBRARIES
|
||||
#
|
||||
|
||||
if (WIN32)
|
||||
set (DIRECT3D_FOUND 0)
|
||||
|
||||
set (DIRECTX_INC_SEARCH_PATH
|
||||
"$ENV{DIRECTX_ROOT}/Include"
|
||||
"$ENV{DXSDK_DIR}/Include"
|
||||
"C:/apps_x86/Microsoft DirectX SDK*/Include"
|
||||
"C:/Program Files (x86)/Microsoft DirectX SDK*/Include"
|
||||
"C:/apps/Microsoft DirectX SDK*/Include"
|
||||
"C:/Program Files/Microsoft DirectX SDK*/Include")
|
||||
find_path (DIRECT3D_INCLUDE_DIR d3dx9.h ${DIRECTX_INC_SEARCH_PATH})
|
||||
|
||||
if (CMAKE_CL_64)
|
||||
set (DIRECTX_LIB_SEARCH_PATH
|
||||
"$ENV{DIRECTX_ROOT}/Lib/x64"
|
||||
"$ENV{DXSDK_DIR}/Lib/x64"
|
||||
"C:/Program Files (x86)/Microsoft DirectX SDK*/Lib/x64"
|
||||
"C:/Program Files/Microsoft DirectX SDK*/Lib/x64")
|
||||
else ()
|
||||
set (DIRECTX_LIB_SEARCH_PATH
|
||||
"$ENV{DIRECTX_ROOT}/Lib"
|
||||
"$ENV{DIRECTX_ROOT}/Lib/x86"
|
||||
"$ENV{DXSDK_DIR}/Lib"
|
||||
"$ENV{DXSDK_DIR}/Lib/x86"
|
||||
"C:/Program Files (x86)/Microsoft DirectX SDK*/Lib"
|
||||
"C:/Program Files (x86)/Microsoft DirectX SDK*/Lib/x86"
|
||||
"C:/Program Files/Microsoft DirectX SDK*/Lib"
|
||||
"C:/Program Files/Microsoft DirectX SDK*/Lib/x86")
|
||||
endif ()
|
||||
find_library (DIRECT3D_LIBRARIES d3d9 ${DIRECTX_LIB_SEARCH_PATH})
|
||||
|
||||
if (DIRECT3D_INCLUDE_DIR AND DIRECT3D_LIBRARIES)
|
||||
set (DIRECT3D_FOUND 1)
|
||||
get_filename_component (DIRECT3D_LIBRARY_DIR ${DIRECT3D_LIBRARIES} PATH)
|
||||
endif ()
|
||||
|
||||
if (DIRECT3D_FOUND)
|
||||
include (FindPackageMessage)
|
||||
FIND_PACKAGE_MESSAGE (Direct3D "Found Microsoft Direct3D: ${DIRECT3D_LIBRARIES} ${DIRECT3D_INCLUDE_DIR}" "[${DIRECT3D_LIBRARIES}][${DIRECT3D_INCLUDE_DIR}]")
|
||||
else ()
|
||||
if (Direct3D_FIND_REQUIRED)
|
||||
message (FATAL_ERROR "Could not find Microsoft Direct3D")
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
mark_as_advanced (DIRECT3D_INCLUDE_DIR DIRECT3D_LIBRARIES)
|
||||
endif ()
|
|
@ -0,0 +1,97 @@
|
|||
#
|
||||
# Copyright (c) 2008-2013 the Urho3D project.
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
# Find Urho3D library and include directories in the build tree or installed location
|
||||
# For build tree detection, Urho3D must be already built with ENABLE_LIBRARY turned on
|
||||
#
|
||||
# URHO3D_FOUND
|
||||
# URHO3D_INCLUDE_DIR
|
||||
# URHO3D_LIBRARY_DIR
|
||||
# URHO3D_LIBRARIES
|
||||
#
|
||||
|
||||
set (URHO3D_FOUND 0)
|
||||
|
||||
set (URHO3D_HOME $ENV{URHO3D_HOME})
|
||||
if (URHO3D_HOME)
|
||||
file (TO_CMAKE_PATH ${URHO3D_HOME} URHO3D_HOME)
|
||||
|
||||
# Construct build tree paths from URHO3D_HOME environment variable
|
||||
find_file (BUILD_TREE_PATH Engine.h ${URHO3D_HOME}/Engine/Engine NO_DEFAULT_PATH)
|
||||
if (NOT BUILD_TREE_PATH)
|
||||
find_file (BUILD_TREE_PATH Engine.h ${URHO3D_HOME}/trunk/Engine/Engine NO_DEFAULT_PATH)
|
||||
endif ()
|
||||
if (BUILD_TREE_PATH)
|
||||
string (REPLACE "/Engine/Engine.h" "" BUILD_TREE_PATH ${BUILD_TREE_PATH})
|
||||
set (URHO3D_INCLUDE_DIR
|
||||
${BUILD_TREE_PATH}/Audio
|
||||
${BUILD_TREE_PATH}/Container
|
||||
${BUILD_TREE_PATH}/Core
|
||||
${BUILD_TREE_PATH}/Engine
|
||||
${BUILD_TREE_PATH}/Graphics
|
||||
${BUILD_TREE_PATH}/Input
|
||||
${BUILD_TREE_PATH}/IO
|
||||
${BUILD_TREE_PATH}/Math
|
||||
${BUILD_TREE_PATH}/Navigation
|
||||
${BUILD_TREE_PATH}/Network
|
||||
${BUILD_TREE_PATH}/Physics
|
||||
${BUILD_TREE_PATH}/Resource
|
||||
${BUILD_TREE_PATH}/Scene
|
||||
${BUILD_TREE_PATH}/Script
|
||||
${BUILD_TREE_PATH}/UI
|
||||
${BUILD_TREE_PATH}/../Extras/LuaScript
|
||||
${BUILD_TREE_PATH}/../Urho3D/lib)
|
||||
|
||||
if (RASPI)
|
||||
set (URHO3D_LIB_SEARCH_PATH
|
||||
${BUILD_TREE_PATH}/../raspi-build/Urho3D/lib
|
||||
${BUILD_TREE_PATH}/../../raspi-build/Urho3D/lib)
|
||||
else ()
|
||||
set (URHO3D_LIB_SEARCH_PATH
|
||||
${BUILD_TREE_PATH}/../build/Urho3D/lib
|
||||
${BUILD_TREE_PATH}/../../build/Urho3D/lib)
|
||||
endif ()
|
||||
find_library (URHO3D_LIBRARIES Urho3D ${URHO3D_LIB_SEARCH_PATH} NO_DEFAULT_PATH)
|
||||
endif ()
|
||||
else ()
|
||||
set (URHO3D_INC_SEARCH_PATH /opt/include)
|
||||
find_path (URHO3D_INCLUDE_DIR Engine.h PATH_SUFFIXES Urho3D ${URHO3D_INC_SEARCH_PATH})
|
||||
|
||||
set (URHO3D_LIB_SEARCH_PATH /opt/lib)
|
||||
find_library (URHO3D_LIBRARIES Urho3D PATH_SUFFIXES Urho3D ${URHO3D_LIB_SEARCH_PATH})
|
||||
endif ()
|
||||
|
||||
if (URHO3D_INCLUDE_DIR AND URHO3D_LIBRARIES)
|
||||
set (URHO3D_FOUND 1)
|
||||
get_filename_component (URHO3D_LIBRARY_DIR ${URHO3D_LIBRARIES} PATH)
|
||||
endif ()
|
||||
|
||||
if (URHO3D_FOUND)
|
||||
include (FindPackageMessage)
|
||||
FIND_PACKAGE_MESSAGE (Urho3D "Found Urho3D: ${URHO3D_LIBRARIES} ${URHO3D_INCLUDE_DIR}" "[${URHO3D_LIBRARIES}][${URHO3D_INCLUDE_DIR}]")
|
||||
else ()
|
||||
if (Urho3D_FIND_REQUIRED)
|
||||
message (FATAL_ERROR "Could not find Urho3D installation or build tree via ENV{URHO3D_HOME}")
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
mark_as_advanced (URHO3D_INCLUDE_DIR URHO3D_LIBRARIES)
|
|
@ -0,0 +1,310 @@
|
|||
#
|
||||
# Copyright (c) 2008-2013 the Urho3D project.
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
# Disable unnecessary build types
|
||||
set (CMAKE_CONFIGURATION_TYPES "RelWithDebInfo;Debug;Release" CACHE STRING "Configurations" FORCE)
|
||||
|
||||
# Set the build type if not explicitly set, for single-configuration generator only
|
||||
if (NOT MSVC AND NOT CMAKE_GENERATOR STREQUAL "Xcode" AND NOT CMAKE_BUILD_TYPE)
|
||||
set (CMAKE_BUILD_TYPE "RelWithDebInfo")
|
||||
endif ()
|
||||
|
||||
# Enable 64-bit build. Disabled by default. On Visual Studio, depends on the generator used
|
||||
if (NOT MSVC)
|
||||
# set (ENABLE_64BIT 1)
|
||||
else ()
|
||||
if (CMAKE_GENERATOR MATCHES "Win64")
|
||||
set (ENABLE_64BIT 1)
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
# Enable SSE instruction set. Requires Pentium III or Athlon XP processor at minimum.
|
||||
set (ENABLE_SSE 1)
|
||||
add_definitions (-DENABLE_SSE)
|
||||
|
||||
# Enable structured exception handling and minidumps on MSVC only.
|
||||
if (MSVC)
|
||||
set (ENABLE_MINIDUMPS 1)
|
||||
add_definitions (-DENABLE_MINIDUMPS)
|
||||
endif ()
|
||||
|
||||
# Enable file watcher support for automatic resource reloads.
|
||||
add_definitions (-DENABLE_FILEWATCHER)
|
||||
|
||||
# Enable profiling. If disabled, autoprofileblocks become no-ops and the Profiler subsystem is not
|
||||
# instantiated.
|
||||
add_definitions (-DENABLE_PROFILING)
|
||||
|
||||
# Enable logging. If disabled, LOGXXXX macros become no-ops and the Log subsystem is not instantiated.
|
||||
add_definitions (-DENABLE_LOGGING)
|
||||
|
||||
# If not on MSVC, enable use of OpenGL instead of Direct3D9 (either not compiling on Windows or
|
||||
# with a compiler that may not have an up-to-date DirectX SDK). This can also be unconditionally
|
||||
# enabled, but Windows graphics card drivers are usually better optimized for Direct3D.
|
||||
if (NOT MSVC)
|
||||
set (USE_OPENGL 1)
|
||||
endif ()
|
||||
if (USE_OPENGL)
|
||||
add_definitions (-DUSE_OPENGL)
|
||||
endif ()
|
||||
|
||||
# If not on Windows, enable Unix mode for kNet library.
|
||||
if (NOT WIN32)
|
||||
add_definitions (-DUNIX)
|
||||
endif ()
|
||||
|
||||
# If using Windows and not OpenGL, find DirectX SDK include & library directories
|
||||
if (WIN32 AND NOT USE_OPENGL)
|
||||
find_package (Direct3D REQUIRED)
|
||||
include_directories (${DIRECT3D_INCLUDE_DIR})
|
||||
link_directories (${DIRECT3D_LIBRARY_DIR})
|
||||
endif ()
|
||||
|
||||
# For Raspbery Pi, find Broadcom VideoCore IV firmware
|
||||
if (RASPI)
|
||||
find_package (BCM_VC REQUIRED)
|
||||
link_directories (${BCM_VC_LIBRARY_DIR})
|
||||
endif ()
|
||||
|
||||
# Platform and compiler specific options
|
||||
if (IOS)
|
||||
# IOS-specific setup
|
||||
add_definitions (-DIOS)
|
||||
set (CMAKE_OSX_ARCHITECTURES $(ARCHS_STANDARD_32_BIT))
|
||||
set (CMAKE_XCODE_EFFECTIVE_PLATFORMS "-iphoneos;-iphonesimulator")
|
||||
set (MACOSX_BUNDLE_GUI_IDENTIFIER "com.googlecode.urho3d")
|
||||
set (CMAKE_OSX_SYSROOT "iphoneos") # Set to "Latest iOS"
|
||||
elseif (CMAKE_GENERATOR STREQUAL "Xcode")
|
||||
# MacOSX-Xcode-specific setup
|
||||
if (NOT ENABLE_64BIT)
|
||||
set (CMAKE_OSX_ARCHITECTURES $(ARCHS_STANDARD_32_BIT))
|
||||
endif ()
|
||||
set (CMAKE_OSX_SYSROOT "") # Set to "Current OS X"
|
||||
#set (CMAKE_OSX_SYSROOT "macosx") # Set to "Latest OS X"
|
||||
endif ()
|
||||
if (MSVC)
|
||||
# Visual Studio-specific setup
|
||||
add_definitions (-D_CRT_SECURE_NO_WARNINGS)
|
||||
set (CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /MTd")
|
||||
set (CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELEASE} /MT /fp:fast /Zi /GS-")
|
||||
set (CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELWITHDEBINFO}")
|
||||
set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MTd")
|
||||
set (CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELEASE} /MT /fp:fast /Zi /GS- /D _SECURE_SCL=0")
|
||||
set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")
|
||||
# SSE flag is redundant if already compiling as 64bit
|
||||
if (ENABLE_SSE AND NOT ENABLE_64BIT)
|
||||
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /arch:SSE")
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /arch:SSE")
|
||||
endif ()
|
||||
set (CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /OPT:REF /OPT:ICF /DEBUG")
|
||||
set (CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /OPT:REF /OPT:ICF")
|
||||
else ()
|
||||
# GCC-specific setup
|
||||
if (ANDROID)
|
||||
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fstack-protector")
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-invalid-offsetof -fstack-protector")
|
||||
elseif (NOT IOS)
|
||||
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O2 -ffast-math")
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-invalid-offsetof -O2 -ffast-math")
|
||||
if (ENABLE_LIBRARY MATCHES "SHARED|shared")
|
||||
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
|
||||
endif ()
|
||||
if (RASPI)
|
||||
add_definitions (-DRASPI)
|
||||
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pipe -mcpu=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard")
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pipe -mcpu=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard")
|
||||
elseif (ENABLE_64BIT)
|
||||
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m64")
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m64")
|
||||
else ()
|
||||
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m32")
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m32")
|
||||
if (ENABLE_SSE)
|
||||
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -msse")
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse")
|
||||
endif ()
|
||||
endif ()
|
||||
if (WIN32)
|
||||
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -static-libgcc")
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -static-libstdc++ -static-libgcc")
|
||||
endif ()
|
||||
endif ()
|
||||
set (CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -D_DEBUG")
|
||||
set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -D_DEBUG")
|
||||
endif ()
|
||||
|
||||
# Macro for precompiled headers
|
||||
macro (enable_pch)
|
||||
if (MSVC)
|
||||
foreach(FILE ${SOURCE_FILES})
|
||||
if (${FILE} MATCHES "[A-Za-z0-9 _/]*[.]cpp")
|
||||
if (${FILE} MATCHES "Precompiled.cpp$")
|
||||
set_source_files_properties(${FILE} PROPERTIES COMPILE_FLAGS "/YcPrecompiled.h")
|
||||
else ()
|
||||
set_source_files_properties(${FILE} PROPERTIES COMPILE_FLAGS "/YuPrecompiled.h")
|
||||
endif ()
|
||||
endif ()
|
||||
endforeach ()
|
||||
endif ()
|
||||
endmacro ()
|
||||
|
||||
# Macro for setting up dependency lib for compilation and linking of a target
|
||||
macro (setup_target)
|
||||
# Include directories
|
||||
include_directories (${LIBS} ${INCLUDE_DIRS_ONLY})
|
||||
# Link libraries
|
||||
define_dependency_libs (${TARGET_NAME})
|
||||
string (REGEX REPLACE "\\.\\./|ThirdParty/|Engine/|Extras/|/Include|/include|/src" "" STRIP_LIBS "${LIBS};${LINK_LIBS_ONLY}")
|
||||
target_link_libraries (${TARGET_NAME} ${STRIP_LIBS})
|
||||
endmacro ()
|
||||
|
||||
# Macro for setting up a library target
|
||||
macro (setup_library)
|
||||
add_library (${TARGET_NAME} ${LIB_TYPE} ${SOURCE_FILES})
|
||||
setup_target ()
|
||||
endmacro ()
|
||||
|
||||
# Macro for setting up an executable target
|
||||
macro (setup_executable)
|
||||
add_executable (${TARGET_NAME} ${EXE_TYPE} ${SOURCE_FILES})
|
||||
setup_target ()
|
||||
if (MSVC)
|
||||
add_custom_command (TARGET ${TARGET_NAME} POST_BUILD COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different \"$(TARGETPATH)\" ${PROJECT_SOURCE_DIR}/Bin)
|
||||
add_custom_command (TARGET ${TARGET_NAME} POST_BUILD COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different \"$(TARGETDIR)$(TARGETNAME).pdb\" ${PROJECT_SOURCE_DIR}/Bin)
|
||||
elseif (IOS)
|
||||
set_target_properties (${TARGET_NAME} PROPERTIES XCODE_ATTRIBUTE_TARGETED_DEVICE_FAMILY "1,2")
|
||||
else ()
|
||||
get_target_property (EXECUTABLE_NAME ${TARGET_NAME} LOCATION)
|
||||
if (CMAKE_CROSSCOMPILING)
|
||||
file (MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/Bin-CC)
|
||||
add_custom_command (TARGET ${TARGET_NAME} POST_BUILD COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different ${EXECUTABLE_NAME} ${CMAKE_BINARY_DIR}/Bin-CC)
|
||||
if (SCP_TO_TARGET)
|
||||
add_custom_command (TARGET ${TARGET_NAME} POST_BUILD COMMAND scp ${EXECUTABLE_NAME} ${SCP_TO_TARGET} || exit 0)
|
||||
endif ()
|
||||
else ()
|
||||
add_custom_command (TARGET ${TARGET_NAME} POST_BUILD COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different ${EXECUTABLE_NAME} ${PROJECT_SOURCE_DIR}/Bin)
|
||||
endif ()
|
||||
endif ()
|
||||
endmacro ()
|
||||
|
||||
# Macro for setting up an executable target with resources to copy
|
||||
macro (setup_main_executable)
|
||||
# Define resource files
|
||||
if (APPLE)
|
||||
set (RESOURCE_FILES ${PROJECT_SOURCE_DIR}/Bin/CoreData ${PROJECT_SOURCE_DIR}/Bin/Data)
|
||||
set_source_files_properties(${RESOURCE_FILES} PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
|
||||
set (SOURCE_FILES ${SOURCE_FILES} ${RESOURCE_FILES})
|
||||
endif ()
|
||||
|
||||
# Setup target
|
||||
if (WIN32)
|
||||
set (EXE_TYPE WIN32)
|
||||
elseif (IOS)
|
||||
set (CMAKE_EXE_LINKER_FLAGS "-framework AudioToolbox -framework CoreAudio -framework CoreGraphics -framework Foundation -framework OpenGLES -framework QuartzCore -framework UIKit")
|
||||
set (EXE_TYPE MACOSX_BUNDLE)
|
||||
elseif (APPLE)
|
||||
set (CMAKE_EXE_LINKER_FLAGS "-framework AudioUnit -framework Carbon -framework Cocoa -framework CoreAudio -framework ForceFeedback -framework IOKit -framework OpenGL -framework CoreServices")
|
||||
endif ()
|
||||
if (ANDROID)
|
||||
add_library (${TARGET_NAME} SHARED ${SOURCE_FILES})
|
||||
setup_target ()
|
||||
# Strip the output shared library
|
||||
get_target_property (EXECUTABLE_NAME ${TARGET_NAME} LOCATION)
|
||||
add_custom_command (TARGET ${TARGET_NAME} POST_BUILD COMMAND ${CMAKE_STRIP} ${EXECUTABLE_NAME})
|
||||
else ()
|
||||
setup_executable ()
|
||||
endif ()
|
||||
|
||||
# Define a custom target to check for resource modification
|
||||
if (IOS)
|
||||
get_target_property (TARGET_LOC ${TARGET_NAME} LOCATION)
|
||||
string (REGEX REPLACE "/Contents/MacOS" "" TARGET_LOC ${TARGET_LOC}) # The regex replacement is temporary workaround to correct the wrong location caused by CMake/Xcode generator bug
|
||||
add_custom_target (RESOURCE_CHECK_${TARGET_NAME} ALL
|
||||
\(\( `find ${RESOURCE_FILES} -newer ${TARGET_LOC} 2>/dev/null |wc -l` \)\) && touch -cm ${SOURCE_FILES} || exit 0
|
||||
COMMENT "This is a dummy target to check for changes in the Resource folders"
|
||||
)
|
||||
add_dependencies (${TARGET_NAME} RESOURCE_CHECK_${TARGET_NAME})
|
||||
endif ()
|
||||
endmacro ()
|
||||
|
||||
# Macro for adjusting library output name by dropping _suffix from the target name
|
||||
macro (adjust_library_name)
|
||||
string (REGEX REPLACE "_.*$" "" LIB_NAME ${TARGET_NAME})
|
||||
set_target_properties (${TARGET_NAME} PROPERTIES OUTPUT_NAME ${LIB_NAME})
|
||||
endmacro ()
|
||||
|
||||
# Macro for defining external dependency libraries
|
||||
macro (define_dependency_libs TARGET)
|
||||
# SDL external dependency
|
||||
if (${TARGET} MATCHES "SDL|MAIN|Main|main")
|
||||
if (WIN32)
|
||||
set (LINK_LIBS_ONLY ${LINK_LIBS_ONLY} user32 gdi32 winmm imm32 ole32 oleaut32 version uuid)
|
||||
elseif (APPLE)
|
||||
set (LINK_LIBS_ONLY ${LINK_LIBS_ONLY} dl pthread)
|
||||
elseif (ANDROID)
|
||||
set (LINK_LIBS_ONLY ${LINK_LIBS_ONLY} dl log)
|
||||
else ()
|
||||
set (LINK_LIBS_ONLY ${LINK_LIBS_ONLY} dl pthread rt)
|
||||
if (RASPI)
|
||||
set (LINK_LIBS_ONLY ${LINK_LIBS_ONLY} bcm_host)
|
||||
endif ()
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
# Engine/Core external dependency
|
||||
if (${TARGET} MATCHES "Core|MAIN|Main|main")
|
||||
if (WIN32)
|
||||
set (LINK_LIBS_ONLY ${LINK_LIBS_ONLY} winmm.lib)
|
||||
if (ENABLE_MINIDUMPS)
|
||||
set (LINK_LIBS_ONLY ${LINK_LIBS_ONLY} dbghelp.lib)
|
||||
endif ()
|
||||
elseif (NOT ANDROID)
|
||||
set (LINK_LIBS_ONLY ${LINK_LIBS_ONLY} pthread)
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
# Engine/Graphics external dependency
|
||||
if (${TARGET} MATCHES "Graphics|MAIN|Main|main")
|
||||
if (USE_OPENGL)
|
||||
if (WIN32)
|
||||
set (LINK_LIBS_ONLY ${LINK_LIBS_ONLY} opengl32)
|
||||
elseif (ANDROID OR RASPI)
|
||||
set (LINK_LIBS_ONLY ${LINK_LIBS_ONLY} GLESv1_CM GLESv2)
|
||||
elseif (NOT APPLE)
|
||||
set (LINK_LIBS_ONLY ${LINK_LIBS_ONLY} GL)
|
||||
endif ()
|
||||
else ()
|
||||
set (LINK_LIBS_ONLY ${LINK_LIBS_ONLY} d3d9)
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
# Main external dependency
|
||||
if (${TARGET} MATCHES "MAIN|Main|main")
|
||||
set (LINK_LIBS_ONLY ${LINK_LIBS_ONLY} Urho3D)
|
||||
endif ()
|
||||
|
||||
if (LINK_LIBS_ONLY)
|
||||
list (REMOVE_DUPLICATES LINK_LIBS_ONLY)
|
||||
list (SORT LINK_LIBS_ONLY)
|
||||
endif ()
|
||||
endmacro ()
|
|
@ -1452,9 +1452,8 @@ if( ANDROID_COMPILER_IS_CLANG )
|
|||
endif()
|
||||
|
||||
# cache flags
|
||||
# Urho3D: buffer overflow protection
|
||||
set( CMAKE_CXX_FLAGS "-fstack-protector" CACHE STRING "c++ flags" )
|
||||
set( CMAKE_C_FLAGS "-fstack-protector" CACHE STRING "c flags" )
|
||||
set( CMAKE_CXX_FLAGS "" CACHE STRING "c++ flags" )
|
||||
set( CMAKE_C_FLAGS "" CACHE STRING "c flags" )
|
||||
# Urho3D: optimise for size
|
||||
set( CMAKE_CXX_FLAGS_RELEASE "-Os -g -DNDEBUG" CACHE STRING "c++ Release flags" )
|
||||
set( CMAKE_C_FLAGS_RELEASE "-Os -g -DNDEBUG" CACHE STRING "c Release flags" )
|
||||
|
|
|
@ -1 +1 @@
|
|||
./cmake_gcc.sh eclipse $@
|
||||
$( dirname $0 )/cmake_gcc.sh eclipse $@
|
||||
|
|
|
@ -37,7 +37,7 @@ sed -i.bak 's/OpenGL/Direct3D9/g' Doxyfile
|
|||
|
||||
# Create symbolic links in the build directories
|
||||
for dir in CoreData Data; do
|
||||
[ $ECLIPSE ] && cmake -E create_symlink $PROJ/Bin/$dir ../build/Urho3D/$dir
|
||||
[ $ECLIPSE ] && cmake -E create_symlink $PROJ/Bin/$dir ../build/Urho3D/bin/$dir
|
||||
if [ $ANDROID_NDK ]; then
|
||||
cmake -E create_symlink ../../Bin/$dir Android/assets/$dir
|
||||
for f in AndroidManifest.xml build.xml project.properties src res assets; do
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
cd $( dirname $0 )
|
||||
rm -f CMakeCache.txt
|
||||
cmake -G "Xcode" -DIOS=1 $@
|
||||
sed -i.bak 's/OpenGL/Direct3D9/g' Doxyfile
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
cd $( dirname $0 )
|
||||
rm -f CMakeCache.txt
|
||||
cmake -G "Xcode" $@
|
||||
sed -i.bak 's/lastKnownFileType = sourcecode; name = "as_callfunc_arm_xcode.S"/lastKnownFileType = sourcecode.asm; name = "as_callfunc_arm_xcode.S"/g' Urho3D.xcodeproj/project.pbxproj
|
||||
|
|
Загрузка…
Ссылка в новой задаче