-
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
42 changed files
with
772 additions
and
772 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,52 +1,52 @@ | ||
|
||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEBUG") | ||
set( CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEBUG" ) | ||
|
||
if (NOT APPLE) | ||
if (CMAKE_BUILD_TYPE STREQUAL "") | ||
set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "One of: Debug Release RelWithDebInfo MinSizeRel." FORCE) | ||
endif () | ||
else () | ||
set(MACOSX_BUNDLE_GUI_IDENTIFIER "org.ogre3d.\${PRODUCT_NAME:rfc1034identifier}") | ||
endif () | ||
if( NOT APPLE ) | ||
if( CMAKE_BUILD_TYPE STREQUAL "" ) | ||
set( CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "One of: Debug Release RelWithDebInfo MinSizeRel." FORCE ) | ||
endif() | ||
else() | ||
set(MACOSX_BUNDLE_GUI_IDENTIFIER "org.ogre3d.\${PRODUCT_NAME:rfc1034identifier}") | ||
endif() | ||
|
||
if (NOT MSVC) | ||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEBUG=1 -D_DEBUG=1 -g") | ||
set(CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL} -Os -DNDEBUG") | ||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O2 -DNDEBUG") | ||
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -O2 -g") | ||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-overloaded-virtual") | ||
#set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-overloaded-virtual" ) | ||
endif () | ||
if( NOT MSVC ) | ||
set( CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEBUG=1 -D_DEBUG=1 -g" ) | ||
set( CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL} -Os -DNDEBUG" ) | ||
set( CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O2 -DNDEBUG" ) | ||
set( CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -O2 -g" ) | ||
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-overloaded-virtual" ) | ||
#set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-overloaded-virtual" ) | ||
endif() | ||
|
||
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang") | ||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fno-limit-debug-info") | ||
endif () | ||
if( CMAKE_CXX_COMPILER_ID MATCHES "Clang" ) | ||
set( CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fno-limit-debug-info" ) | ||
endif() | ||
|
||
# Determine if we are compiling for a 32bit or 64bit system | ||
if (NOT APPLE) | ||
include(CheckTypeSize) | ||
CHECK_TYPE_SIZE("void*" ARCH_PTR_SIZE BUILTIN_TYPES_ONLY) | ||
if (ARCH_PTR_SIZE EQUAL 8) | ||
set(PLATFORM_X64 TRUE) | ||
else () | ||
set(PLATFORM_X64 FALSE) | ||
endif () | ||
endif () | ||
if( NOT APPLE ) | ||
include(CheckTypeSize) | ||
CHECK_TYPE_SIZE("void*" ARCH_PTR_SIZE BUILTIN_TYPES_ONLY) | ||
if (ARCH_PTR_SIZE EQUAL 8) | ||
set(PLATFORM_X64 TRUE) | ||
else () | ||
set(PLATFORM_X64 FALSE) | ||
endif () | ||
endif() | ||
|
||
if (MSVC) | ||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP") | ||
if (NOT PLATFORM_X64) | ||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /arch:SSE2") | ||
endif () | ||
add_definitions(-DUNICODE -D_UNICODE) | ||
endif () | ||
if( MSVC ) | ||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP") | ||
if( NOT PLATFORM_X64 ) | ||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /arch:SSE2") | ||
endif() | ||
add_definitions( -DUNICODE -D_UNICODE ) | ||
endif() | ||
|
||
if (APPLE) | ||
macro(add_recursive dir retVal) | ||
file(GLOB_RECURSE ${retVal} ${dir}/*.h ${dir}/*.cpp ${dir}/*.c ${dir}/*.mm ${dir}/*.m) | ||
endmacro() | ||
else () | ||
macro(add_recursive dir retVal) | ||
file(GLOB_RECURSE ${retVal} ${dir}/*.h ${dir}/*.cpp ${dir}/*.c) | ||
endmacro() | ||
endif () | ||
if( APPLE ) | ||
macro( add_recursive dir retVal ) | ||
file( GLOB_RECURSE ${retVal} ${dir}/*.h ${dir}/*.cpp ${dir}/*.c ${dir}/*.mm ${dir}/*.m ) | ||
endmacro() | ||
else() | ||
macro( add_recursive dir retVal ) | ||
file( GLOB_RECURSE ${retVal} ${dir}/*.h ${dir}/*.cpp ${dir}/*.c ) | ||
endmacro() | ||
endif() |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,114 @@ | ||
set(CMAKE_THREAD_PREFER_PTHREAD YES) | ||
include(DependenciesFunctions) | ||
|
||
set(CMAKE_THREAD_PREFER_PTHREAD YES) | ||
find_package(Threads REQUIRED) | ||
|
||
find_package(Boost REQUIRED) | ||
find_package(Bullet REQUIRED) | ||
find_package(enet REQUIRED) | ||
find_package(MyGUI REQUIRED) | ||
find_package(Ogg REQUIRED) | ||
find_package(OGRE REQUIRED) | ||
find_package(OpenAL REQUIRED) | ||
find_package(RapidJSON REQUIRED) | ||
find_package(SDL2 REQUIRED) | ||
find_package(tinyxml2 REQUIRED) | ||
find_package(Vorbis REQUIRED) | ||
|
||
include(AddMissingTargets) | ||
# Some pkg-config files are broken, that is why they are commented out | ||
|
||
# fails | ||
#add_external_lib( | ||
# Boost | ||
# boost/1.81.0 | ||
# REQUIRED | ||
# FIND_PACKAGE_OPTIONS COMPONENTS system thread | ||
#) | ||
|
||
#add_external_lib( | ||
# OGRE | ||
# ogre3d/13.4.4@anotherfoxguy/stable | ||
# REQUIRED | ||
# CONAN_PKG_NAME OGRE | ||
# CONAN_OPTIONS ogre3d:nodeless_positioning=True ogre3d:resourcemanager_strict=off | ||
# # uncomment below for Ogre 1.9 | ||
# #PKG_CONFIG "OGRE, OGRE-Terrain, OGRE-Paging, OGRE-Overlay" | ||
# FIND_PACKAGE_OPTIONS CONFIG COMPONENTS Bites Overlay Paging RTShaderSystem MeshLodGenerator Terrain | ||
#) | ||
|
||
add_external_lib( | ||
BULLET | ||
bullet3/3.24 | ||
REQUIRED | ||
FIND_PACKAGE | ||
CONAN_OPTIONS bullet3:extras=True bullet3:network_support=True | ||
INTERFACE_NAME Bullet::Bullet | ||
) | ||
|
||
#add_external_lib( | ||
# SDL2 | ||
# sdl/2.0.20 | ||
# REQUIRED | ||
# PKG_CONFIG "sdl2 >= 2.0" | ||
# FIND_PACKAGE_OPTIONS CONFIG | ||
# CONAN_OPTIONS sdl:sdl2main=False | ||
#) | ||
|
||
#add_external_lib( | ||
# MyGUI | ||
# mygui/3.4.1@anotherfoxguy/stable | ||
# REQUIRED | ||
# # PKG_CONFIG "MYGUI = 3.4.0" | ||
# FIND_PACKAGE | ||
#) | ||
|
||
add_external_lib( | ||
OGG | ||
ogg/1.3.5 | ||
REQUIRED | ||
PKG_CONFIG "ogg >= 1.2" | ||
FIND_PACKAGE | ||
) | ||
|
||
add_external_lib( | ||
VorbisFile | ||
vorbis/1.3.7 | ||
REQUIRED | ||
PKG_CONFIG "vorbis >= 1.2, vorbisfile >= 1.2" | ||
FIND_PACKAGE | ||
) | ||
|
||
# todo: fix Cannot load recipe. | ||
#add_external_lib( | ||
# OpenAL | ||
# openal/1.22.2 | ||
# REQUIRED | ||
# PKG_CONFIG "openal >= 1.18" | ||
# FIND_PACKAGE_OPTIONS CONFIG | ||
#) | ||
|
||
#add_external_lib( | ||
# ENet | ||
# enet/1.3.17 | ||
# REQUIRED | ||
# PKG_CONFIG "libenet >= 1.2" | ||
# FIND_PACKAGE | ||
#) | ||
|
||
add_external_lib( | ||
tinyxml2 | ||
tinyxml2/9.0.0 | ||
REQUIRED | ||
PKG_CONFIG "tinyxml2 >= 6" | ||
FIND_PACKAGE | ||
) | ||
|
||
|
||
set(LIBS | ||
#Boost::Boost # fails | ||
#Threads::Threads | ||
#OGRE::OGRE | ||
#- Bullet::Bullet // fixme? | ||
#SDL2::SDL2 | ||
#MyGUI::MyGUI | ||
VorbisFile::VorbisFile | ||
OGG::OGG | ||
#OpenAL::OpenAL # fails | ||
#ENet::ENet # fails | ||
tinyxml2::tinyxml2 | ||
) | ||
|
||
#set(SERVER_LIBS Boost::Boost ENet::ENet) | ||
|
||
|
||
find_package( ENet REQUIRED ) | ||
|
||
find_package( Boost COMPONENTS system thread REQUIRED ) |
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
|
||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEBUG") | ||
|
||
if (NOT APPLE) | ||
if (CMAKE_BUILD_TYPE STREQUAL "") | ||
set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "One of: Debug Release RelWithDebInfo MinSizeRel." FORCE) | ||
endif () | ||
else () | ||
set(MACOSX_BUNDLE_GUI_IDENTIFIER "org.ogre3d.\${PRODUCT_NAME:rfc1034identifier}") | ||
endif () | ||
|
||
if (NOT MSVC) | ||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEBUG=1 -D_DEBUG=1 -g") | ||
set(CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL} -Os -DNDEBUG") | ||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O2 -DNDEBUG") | ||
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -O2 -g") | ||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-overloaded-virtual") | ||
#set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-overloaded-virtual" ) | ||
endif () | ||
|
||
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang") | ||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fno-limit-debug-info") | ||
endif () | ||
|
||
# Determine if we are compiling for a 32bit or 64bit system | ||
if (NOT APPLE) | ||
include(CheckTypeSize) | ||
CHECK_TYPE_SIZE("void*" ARCH_PTR_SIZE BUILTIN_TYPES_ONLY) | ||
if (ARCH_PTR_SIZE EQUAL 8) | ||
set(PLATFORM_X64 TRUE) | ||
else () | ||
set(PLATFORM_X64 FALSE) | ||
endif () | ||
endif () | ||
|
||
if (MSVC) | ||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP") | ||
if (NOT PLATFORM_X64) | ||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /arch:SSE2") | ||
endif () | ||
add_definitions(-DUNICODE -D_UNICODE) | ||
endif () | ||
|
||
if (APPLE) | ||
macro(add_recursive dir retVal) | ||
file(GLOB_RECURSE ${retVal} ${dir}/*.h ${dir}/*.cpp ${dir}/*.c ${dir}/*.mm ${dir}/*.m) | ||
endmacro() | ||
else () | ||
macro(add_recursive dir retVal) | ||
file(GLOB_RECURSE ${retVal} ${dir}/*.h ${dir}/*.cpp ${dir}/*.c) | ||
endmacro() | ||
endif () |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
set(CMAKE_THREAD_PREFER_PTHREAD YES) | ||
|
||
find_package(Threads REQUIRED) | ||
|
||
find_package(Boost REQUIRED) | ||
find_package(Bullet REQUIRED) | ||
find_package(enet REQUIRED) | ||
find_package(MyGUI REQUIRED) | ||
find_package(Ogg REQUIRED) | ||
find_package(OGRE REQUIRED) | ||
find_package(OpenAL REQUIRED) | ||
find_package(RapidJSON REQUIRED) | ||
find_package(SDL2 REQUIRED) | ||
find_package(tinyxml2 REQUIRED) | ||
find_package(Vorbis REQUIRED) | ||
|
||
include(AddMissingTargets) |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.