Skip to content

Commit

Permalink
Oh gawd more sync and stuff to fix linker errors & non(windows|releas…
Browse files Browse the repository at this point in the history
…e) builds!

Also I fixed all the CMake warnings~
  • Loading branch information
LiruMouse committed Jun 9, 2016
1 parent ad66e1c commit 3b5a98e
Show file tree
Hide file tree
Showing 71 changed files with 1,741 additions and 535 deletions.
5 changes: 1 addition & 4 deletions indra/cmake/00-Common.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@ set(${CMAKE_CURRENT_LIST_FILE}_INCLUDED "YES")

include(Variables)


# Portable compilation flags.

set(CMAKE_CXX_FLAGS_DEBUG "-D_DEBUG -DLL_DEBUG=1")
set(CMAKE_CXX_FLAGS_RELEASE
"-DLL_RELEASE=1 -DLL_RELEASE_FOR_DOWNLOAD=1 -D_SECURE_SCL=0 -DNDEBUG")
Expand All @@ -31,12 +29,11 @@ if(NON_RELEASE_CRASH_REPORTING)
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DLL_SEND_CRASH_REPORTS=1")
endif()


# Don't bother with a MinSizeRel build.

set(CMAKE_CONFIGURATION_TYPES "RelWithDebInfo;Release;Debug" CACHE STRING
"Supported build types." FORCE)


# Platform-specific compilation flags.

if (WINDOWS)
Expand Down
94 changes: 70 additions & 24 deletions indra/cmake/Boost.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,78 +7,124 @@ set(Boost_FIND_REQUIRED ON)
if (STANDALONE)
include(FindBoost)

set(Boost_USE_MULTITHREADED ON)
find_package(Boost 1.51.0 COMPONENTS date_time filesystem program_options regex system thread wave context)
set(BOOST_CHRONO_LIBRARY boost_chrono-mt)
set(BOOST_CONTEXT_LIBRARY boost_context-mt)
set(BOOST_COROUTINE_LIBRARY boost_coroutine-mt)
set(BOOST_DATE_TIME_LIBRARY boost_date_time-mt)
set(BOOST_FILESYSTEM_LIBRARY boost_filesystem-mt)
set(BOOST_IOSTREAMS_LIBRARY boost_iostreams-mt)
set(BOOST_PROGRAM_OPTIONS_LIBRARY boost_program_options-mt)
set(BOOST_REGEX_LIBRARY boost_regex-mt)
set(BOOST_SIGNALS_LIBRARY boost_signals-mt)
set(BOOST_SYSTEM_LIBRARY boost_system-mt)
set(BOOST_THREAD_LIBRARY boost_thread-mt)
else (STANDALONE)
use_prebuilt_binary(boost)
set(Boost_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include)
set(Boost_VERSION "1.60")
set(BOOST_VERSION "1.60")

if (WINDOWS)
set(Boost_CONTEXT_LIBRARY
set(BOOST_CHRONO_LIBRARY
optimized libboost_chrono-mt
debug libboost_chrono-mt-gd)
set(BOOST_CONTEXT_LIBRARY
optimized libboost_context-mt
debug libboost_context-mt-gd)
set(Boost_FILESYSTEM_LIBRARY
set(BOOST_COROUTINE_LIBRARY
optimized libboost_coroutine-mt
debug libboost_coroutine-mt-gd)
set(BOOST_DATE_TIME_LIBRARY
optimized libboost_date_time-mt
debug libboost_date_time-mt-gd)
set(BOOST_FILESYSTEM_LIBRARY
optimized libboost_filesystem-mt
debug libboost_filesystem-mt-gd)
set(Boost_PROGRAM_OPTIONS_LIBRARY
set(BOOST_IOSTREAMS_LIBRARY
optimized libboost_iostreams-mt
debug libboost_iostreams-mt-gd)
set(BOOST_PROGRAM_OPTIONS_LIBRARY
optimized libboost_program_options-mt
debug libboost_program_options-mt-gd)
set(Boost_REGEX_LIBRARY
set(BOOST_REGEX_LIBRARY
optimized libboost_regex-mt
debug libboost_regex-mt-gd)
set(Boost_SIGNALS_LIBRARY
set(BOOST_SIGNALS_LIBRARY
optimized libboost_signals-mt
debug libboost_signals-mt-gd)
set(Boost_SYSTEM_LIBRARY
set(BOOST_SYSTEM_LIBRARY
optimized libboost_system-mt
debug libboost_system-mt-gd)
set(Boost_THREAD_LIBRARY
set(BOOST_THREAD_LIBRARY
optimized libboost_thread-mt
debug libboost_thread-mt-gd)
elseif (LINUX)
set(Boost_CONTEXT_LIBRARY
set(BOOST_CHRONO_LIBRARY
optimized boost_chrono-mt
debug boost_chrono-mt-d)
set(BOOST_CONTEXT_LIBRARY
optimized boost_context-mt
debug boost_context-mt-d)
set(Boost_FILESYSTEM_LIBRARY
set(BOOST_COROUTINE_LIBRARY
optimized boost_coroutine-mt
debug boost_coroutine-mt-d)
set(BOOST_DATE_TIME_LIBRARY
optimized boost_date_time-mt
debug boost_date_time-mt-d)
set(BOOST_FILESYSTEM_LIBRARY
optimized boost_filesystem-mt
debug boost_filesystem-mt-d)
set(Boost_PROGRAM_OPTIONS_LIBRARY
set(BOOST_IOSTREAMS_LIBRARY
optimized boost_iostreams-mt
debug boost_iostreams-mt-d)
set(BOOST_PROGRAM_OPTIONS_LIBRARY
optimized boost_program_options-mt
debug boost_program_options-mt-d)
set(Boost_REGEX_LIBRARY
set(BOOST_REGEX_LIBRARY
optimized boost_regex-mt
debug boost_regex-mt-d)
set(Boost_SIGNALS_LIBRARY
set(BOOST_SIGNALS_LIBRARY
optimized boost_signals-mt
debug boost_signals-mt-d)
set(Boost_SYSTEM_LIBRARY
set(BOOST_SYSTEM_LIBRARY
optimized boost_system-mt
debug boost_system-mt-d)
set(Boost_THREAD_LIBRARY
set(BOOST_THREAD_LIBRARY
optimized boost_thread-mt
debug boost_thread-mt-d)
elseif (DARWIN)
set(Boost_CONTEXT_LIBRARY
set(BOOST_CHRONO_LIBRARY
optimized boost_chrono-mt
debug boost_chrono-mt-d)
set(BOOST_CONTEXT_LIBRARY
optimized boost_context-mt
debug boost_context-mt-d)
set(Boost_FILESYSTEM_LIBRARY
set(BOOST_COROUTINE_LIBRARY
optimized boost_coroutine-mt
debug boost_coroutine-mt-d)
set(BOOST_DATE_TIME_LIBRARY
optimized boost_date_time-mt
debug boost_date_time-mt-d)
set(BOOST_FILESYSTEM_LIBRARY
optimized boost_filesystem-mt
debug boost_filesystem-mt-d)
set(Boost_PROGRAM_OPTIONS_LIBRARY
set(BOOST_IOSTREAMS_LIBRARY
optimized boost_iostreams-mt
debug boost_iostreams-mt-d)
set(BOOST_PROGRAM_OPTIONS_LIBRARY
optimized boost_program_options-mt
debug boost_program_options-mt-d)
set(Boost_REGEX_LIBRARY
set(BOOST_REGEX_LIBRARY
optimized boost_regex-mt
debug boost_regex-mt-d)
set(Boost_SIGNALS_LIBRARY
set(BOOST_SIGNALS_LIBRARY
optimized boost_signals-mt
debug boost_signals-mt-d)
set(Boost_SYSTEM_LIBRARY
set(BOOST_SYSTEM_LIBRARY
optimized boost_system-mt
debug boost_system-mt-d)
set(Boost_THREAD_LIBRARY
set(BOOST_THREAD_LIBRARY
optimized boost_thread-mt
debug boost_thread-mt-d)
endif (WINDOWS)
endif (STANDALONE)

24 changes: 0 additions & 24 deletions indra/cmake/CARes.cmake

This file was deleted.

3 changes: 0 additions & 3 deletions indra/cmake/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,19 @@ set(cmake_SOURCE_FILES
Audio.cmake
Boost.cmake
BuildVersion.cmake
CARes.cmake
CEFPlugin.cmake
CMakeCopyIfDifferent.cmake
CURL.cmake
Colladadom.cmake
ConfigurePkgConfig.cmake
Copy3rdPartyLibs.cmake
Cwdebug.cmake
DBusGlib.cmake
DeploySharedLibs.cmake
EXPAT.cmake
ExamplePlugin.cmake
FMODSTUDIO.cmake
FindAPR.cmake
FindAutobuild.cmake
FindCARes.cmake
FindColladadom.cmake
FindGLOD.cmake
FindGoogleBreakpad.cmake
Expand Down
18 changes: 0 additions & 18 deletions indra/cmake/Cwdebug.cmake

This file was deleted.

48 changes: 0 additions & 48 deletions indra/cmake/FindCARes.cmake

This file was deleted.

1 change: 0 additions & 1 deletion indra/cmake/LLAddBuildTest.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
INCLUDE(APR)
INCLUDE(LLMath)
INCLUDE(Tut)
INCLUDE(Cwdebug)

MACRO(ADD_BUILD_TEST_NO_COMMON name parent)
# MESSAGE("${CMAKE_CURRENT_SOURCE_DIR}/tests/${name}_test.cpp")
Expand Down
15 changes: 14 additions & 1 deletion indra/cmake/LLAppearance.cmake
Original file line number Diff line number Diff line change
@@ -1,11 +1,24 @@
# -*- cmake -*-

include(Variables)
include(Boost)
include(LLMessage)
include(LLCoreHttp)

set(LLAPPEARANCE_INCLUDE_DIRS
${LIBS_OPEN_DIR}/llappearance
)

set(LLAPPEARANCE_LIBRARIES llappearance)
if (BUILD_HEADLESS)
set(LLAPPEARANCE_HEADLESS_LIBRARIES
llappearanceheadless
)
endif (BUILD_HEADLESS)

set(LLAPPEARANCE_LIBRARIES llappearance
llmessage
llcorehttp
)



4 changes: 2 additions & 2 deletions indra/cmake/LLAudio.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ set(LLAUDIO_INCLUDE_DIRS
)

add_definitions(-DOV_EXCLUDE_STATIC_CALLBACKS)
set(LLAUDIO_LIBRARIES llaudio ${OPENAL_LIBRARIES})
# be exhaustive here
set(LLAUDIO_LIBRARIES llaudio ${VORBISFILE_LIBRARIES} ${VORBIS_LIBRARIES} ${VORBISENC_LIBRARIES} ${OGG_LIBRARIES} ${OPENAL_LIBRARIES})
19 changes: 4 additions & 15 deletions indra/cmake/LLCommon.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,17 @@ include(Boost)
include(EXPAT)
include(ZLIB)

if (DARWIN)
include(CMakeFindFrameworks)
find_library(CORESERVICES_LIBRARY CoreServices)
endif (DARWIN)


set(LLCOMMON_INCLUDE_DIRS
${LIBS_OPEN_DIR}/cwdebug
${LIBS_OPEN_DIR}/llcommon
${APRUTIL_INCLUDE_DIR}
${APR_INCLUDE_DIR}
)
set(LLCOMMON_SYSTEM_INCLUDE_DIRS
${Boost_INCLUDE_DIRS}
)

if (LINUX)
# In order to support using ld.gold on linux, we need to explicitely
# specify all libraries that llcommon uses.
# llcommon uses `clock_gettime' which is provided by librt on linux.
set(LLCOMMON_LIBRARIES llcommon rt)
else (LINUX)
set(LLCOMMON_LIBRARIES llcommon)
endif (LINUX)
set(LLCOMMON_LIBRARIES llcommon)


set(LLCOMMON_LINK_SHARED OFF CACHE BOOL "Build the llcommon target as a shared library.")
if(LLCOMMON_LINK_SHARED)
Expand Down
5 changes: 1 addition & 4 deletions indra/cmake/LLCoreHttp.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,4 @@ set(LLCOREHTTP_INCLUDE_DIRS
${BOOST_INCLUDE_DIRS}
)

set(LLCOREHTTP_LIBRARIES llcorehttp
${BOOST_COROUTINE_LIBRARY}
${BOOST_CONTEXT_LIBRARY}
${BOOST_SYSTEM_LIBRARY})
set(LLCOREHTTP_LIBRARIES llcorehttp)
2 changes: 0 additions & 2 deletions indra/cmake/LLMessage.cmake
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
# -*- cmake -*-

include(CARes)
include(CURL)
include(OpenSSL)
include(XmlRpcEpi)

set(LLMESSAGE_INCLUDE_DIRS
${LIBS_OPEN_DIR}/llmessage
${CARES_INCLUDE_DIRS}
${CURL_INCLUDE_DIRS}
${OPENSSL_INCLUDE_DIRS}
)
Expand Down
8 changes: 1 addition & 7 deletions indra/cmake/LLPlugin.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,4 @@ set(LLPLUGIN_INCLUDE_DIRS
${LIBS_OPEN_DIR}/llplugin
)

if (LINUX)
# In order to support using ld.gold on linux, we need to explicitely
# specify all libraries that llplugin uses.
set(LLPLUGIN_LIBRARIES llplugin pthread)
else (LINUX)
set(LLPLUGIN_LIBRARIES llplugin)
endif (LINUX)
set(LLPLUGIN_LIBRARIES llplugin)
Loading

0 comments on commit 3b5a98e

Please sign in to comment.