Skip to content

Commit

Permalink
Merge pull request #605 from apathyboy/boost154
Browse files Browse the repository at this point in the history
Boost154
  • Loading branch information
apathyboy committed Jul 1, 2013
2 parents aa88e87 + 3507bfa commit 6128346
Show file tree
Hide file tree
Showing 10 changed files with 148 additions and 249 deletions.
14 changes: 7 additions & 7 deletions CMakeLists.txt
Expand Up @@ -22,7 +22,10 @@ if (${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
endif()
endif()

cmake_minimum_required(VERSION 2.8.7)
cmake_minimum_required(VERSION 2.8.11)

cmake_policy(VERSION 2.8.11.2013-0628-g46c95)
cmake_policy(SET CMP0022 NEW)

project(swganh CXX)

Expand Down Expand Up @@ -156,21 +159,18 @@ if(MSVC)

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4251")

ADD_DEFINITIONS (/D BOOST_ALL_DYN_LINK)
MESSAGE(STATUS "- BOOST: Enable dynamic linking")

ADD_DEFINITIONS (/D _HAS_ITERATOR_DEBUGGING=0)
MESSAGE(STATUS "- MSVC: set iterator debugging to 0")

ADD_DEFINITIONS (/D _SECURE_SCL=0)
MESSAGE(STATUS "- MSVC: set iterator debugging to 0")

add_definitions(-DHAVE_ROUND)
endif()

set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${C_WARNINGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CXX_WARNINGS}")

# Use the static/multithreaded libraries.
add_definitions(-DBOOST_ALL_NO_LIB)
add_definitions(-DBOOST_ALL_DYN_LINK)
set(Boost_USE_STATIC_LIBS OFF)
set(Boost_USE_MULTITHREADED ON)

Expand Down
47 changes: 19 additions & 28 deletions build_deps.bat
Expand Up @@ -36,8 +36,8 @@ set "PROJECT_BASE=%~dp0"
set "PROJECT_DRIVE=%~d0"
set "BUILD_DIR=%PROJECT_BASE%build\deps\"
set "VENDOR_DIR=%PROJECT_BASE%vendor\"
set MSVC_VERSION=11
set BOOST_VERSION=1.53.0
set MSVC_VERSION=12
set BOOST_VERSION=1.54.0
set BOOST_LOG_REVISION=737
set TURTLE_VERSION=1.2.0
set GLM_VERSION=0.9.4.1
Expand Down Expand Up @@ -131,12 +131,12 @@ call where git /Q | findstr /c:"git.exe" >nul && (
exit /b 1
)

if not exist "%VS110COMNTOOLS%" (
echo ***** Microsoft Visual Studio 11 required *****
if not exist "!VS%MSVC_VERSION%0COMNTOOLS!" (
echo ***** Microsoft Visual Studio %MSVC_VERSION% required *****
exit /b 1
)

call "%VS110COMNTOOLS%\vsvars32.bat" >NUL
call "!VS%MSVC_VERSION%0COMNTOOLS!\vsvars32.bat" >NUL

set environment_built=yes

Expand All @@ -156,21 +156,12 @@ set BOOST_FILE=boost_%BOOST_VERSION_ALT%.zip
set BOOST_URL=http://downloads.sourceforge.net/project/boost/boost/%BOOST_VERSION%/%BOOST_FILE%
set BOOST_DIR=boost_%BOOST_VERSION_ALT%

if not exist %BOOST_FILE% (
%WGET% --no-check-certificate !BOOST_URL!
)

if not exist %BOOST_DIR% (
%ZIP% x -y %BOOST_FILE%
)

if not exist boost-log (
git svn clone -r %BOOST_LOG_REVISION% https://boost-log.svn.sourceforge.net/svnroot/boost-log/trunk/boost-log
)
if not exist %BOOST_FILE% (
%WGET% --no-check-certificate !BOOST_URL!
)

if not exist "%BOOST_DIR%\boost\log" (
xcopy "boost-log/boost/log" "%BOOST_DIR%/boost/log" /s /i /y
xcopy "boost-log/libs/log" "%BOOST_DIR%/libs/log" /s /i /y
%ZIP% x -y %BOOST_FILE%
)

cd "%BOOST_DIR%"
Expand All @@ -179,7 +170,7 @@ if not exist b2.exe (
cmd /c bootstrap.bat
)

cmd /c "b2.exe" --toolset=msvc-%MSVC_VERSION%.0 --with-serialization --with-iostreams --with-program_options --with-system --with-thread --with-filesystem --with-log --with-python --with-test --with-date_time variant=debug,release link=shared runtime-link=shared threading=multi define=_SCL_SECURE_NO_WARNINGS=0 define=_ITERATOR_DEBUG_LEVEL=0
cmd /c "b2.exe" --toolset=msvc-%MSVC_VERSION%.0 --with-serialization --with-iostreams --with-program_options --with-system --with-thread --with-filesystem --with-log --with-python --with-test --with-date_time variant=debug,release link=shared runtime-link=shared threading=multi define=HAVE_ROUND define=_SCL_SECURE_NO_WARNINGS=0

if not exist %VENDOR_DIR%include\boost (
xcopy "boost" "%VENDOR_DIR%include\boost" /s /i /y
Expand Down Expand Up @@ -268,7 +259,7 @@ if not exist "%ZLIB_DIR%" (

cd "%ZLIB_DIR%"

cmake -G"Visual Studio 11" .
cmake -G"Visual Studio %MSVC_VERSION%" .
cmake --build . --target zlib --config Debug
cmake --build . --target zlib --config Release

Expand Down Expand Up @@ -320,11 +311,11 @@ if not exist "%MYSQL_C_DIR%" (

cd "%MYSQL_C_DIR%"

cmake -G"Visual Studio 11" .
cmake --build . --target mysqlclient --config Debug
cmake --build . --target libmysql --config Debug
cmake --build . --target mysqlclient --config Release
cmake --build . --target libmysql --config Release
cmake -G"Visual Studio %MSVC_VERSION%" .
cmake --build . --target libmysql/mysqlclient --config Debug
cmake --build . --target libmysql/libmysql --config Debug
cmake --build . --target libmysql/mysqlclient --config Release
cmake --build . --target libmysql/libmysql --config Release

if not exist "%VENDOR_DIR%include\mysql.h" (
xcopy "include" "%VENDOR_DIR%include" /s /i /y
Expand All @@ -351,9 +342,9 @@ if not exist mysql-connector-cpp (

cd mysql-connector-cpp

cmake -G"Visual Studio 11" -DDISABLE_ITERATOR_DEBUGGING=ON -DBOOST_ROOT=%VENDOR_DIR% -DMYSQL_INCLUDE_DIR=%VENDOR_DIR%include -DMYSQL_LIB_DIR=%VENDOR_DIR%lib/Release .
cmake --build . --target mysqlcppconn --config Debug
cmake --build . --target mysqlcppconn --config Release
cmake -G"Visual Studio %MSVC_VERSION%" -DBOOST_ROOT=%VENDOR_DIR% -DMYSQL_INCLUDE_DIR=%VENDOR_DIR%include -DMYSQL_LIB_DIR=%VENDOR_DIR%lib/Release .
cmake --build . --target driver/mysqlcppconn --config Debug
cmake --build . --target driver/mysqlcppconn --config Release

if not exist "%VENDOR_DIR%include\cppconn" (
xcopy "cppconn" "%VENDOR_DIR%include\cppconn" /s /i /y
Expand Down
4 changes: 2 additions & 2 deletions src/swganh/CMakeLists.txt
Expand Up @@ -21,8 +21,8 @@ AddANHExecutable(swganh
${PYTHON_LIBRARY}
${Boost_CHRONO_LIBRARY_DEBUG}
${Boost_DATE_TIME_LIBRARY_DEBUG}
${Boost_LOG_LIBRARY_DEBUG}
${Boost_LOG_SETUP_LIBRARY_DEBUG}
${Boost_LOG_LIBRARY_DEBUG}
${Boost_FILESYSTEM_LIBRARY_DEBUG}
${Boost_PROGRAM_OPTIONS_LIBRARY_DEBUG}
${Boost_PYTHON3_LIBRARY_DEBUG}
Expand All @@ -39,8 +39,8 @@ AddANHExecutable(swganh
${PYTHON_LIBRARY}
${Boost_CHRONO_LIBRARY_RELEASE}
${Boost_DATE_TIME_LIBRARY_RELEASE}
${Boost_LOG_LIBRARY_RELEASE}
${Boost_LOG_SETUP_LIBRARY_RELEASE}
${Boost_LOG_LIBRARY_RELEASE}
${Boost_FILESYSTEM_LIBRARY_RELEASE}
${Boost_PROGRAM_OPTIONS_LIBRARY_RELEASE}
${Boost_PYTHON3_LIBRARY_RELEASE}
Expand Down
2 changes: 2 additions & 0 deletions src/swganh/app/CMakeLists.txt
Expand Up @@ -16,6 +16,7 @@ AddANHPythonBinding(app
DEBUG_LIBRARIES
${Boost_CHRONO_LIBRARY_DEBUG}
${Boost_DATE_TIME_LIBRARY_DEBUG}
${Boost_LOG_SETUP_LIBRARY_DEBUG}
${Boost_LOG_LIBRARY_DEBUG}
${Boost_FILESYSTEM_LIBRARY_DEBUG}
${Boost_PROGRAM_OPTIONS_LIBRARY_DEBUG}
Expand All @@ -31,6 +32,7 @@ AddANHPythonBinding(app
OPTIMIZED_LIBRARIES
${Boost_CHRONO_LIBRARY_RELEASE}
${Boost_DATE_TIME_LIBRARY_RELEASE}
${Boost_LOG_SETUP_LIBRARY_RELEASE}
${Boost_LOG_LIBRARY_RELEASE}
${Boost_FILESYSTEM_LIBRARY_RELEASE}
${Boost_PROGRAM_OPTIONS_LIBRARY_RELEASE}
Expand Down

0 comments on commit 6128346

Please sign in to comment.