* Fix most of the Windows Build - some Irrlicht issues may remain

This commit is contained in:
shlainn 2011-10-12 19:29:26 +02:00
parent 9f78139605
commit e56ed86684
11 changed files with 129 additions and 31 deletions

View File

@ -29,6 +29,7 @@ option(BUILD_TOOLS "Build Tools" 0)
find_package(Platform REQUIRED)
find_package(OpenSSL REQUIRED)
# VS100 uses MSBuild.exe instead of devenv.com, so force it to use devenv.com
if(WIN32 AND MSVC_VERSION MATCHES 1600)
@ -78,9 +79,8 @@ if(CMAKE_INSTALL_PREFIX STREQUAL "/usr/local")
endif()
if(UNIX)
find_package(OpenSSL REQUIRED)
endif()
message("")
message("Install binaries to : ${CMAKE_INSTALL_PREFIX}")

View File

@ -0,0 +1,20 @@
# This module defines
# VS_DEVENV, path to devenv.com.
FIND_PATH(VS100_DIR devenv.com
$ENV{VS100COMNTOOLS}/../IDE
"C:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\Common7\\IDE"
"C:\\Program Files\\Microsoft Visual Studio 10.0\\Common7\\IDE"
"C:\\Programme\\Microsoft Visual Studio 10.0\\Common7\\IDE"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\VisualStudio\\10.0\\Setup\\VS;EnvironmentDirectory]"
)
SET(VS100_FOUND 0)
IF(VS100_DIR)
SET(VS100_FOUND 1)
MESSAGE(STATUS "Found Visual Studion 2010")
ENDIF(VS100_DIR)
MARK_AS_ADVANCED(
VS100_DIR
)

View File

@ -1,11 +1,23 @@
include_directories (${PROJECT_SOURCE_DIR}/src/dep/include ${PROJECT_SOURCE_DIR}/src/shared ${PROJECT_SOURCE_DIR}/src/Client)
set(PSEUWOW_LIBS
PseuGUI DefScript irrKlang irrlicht shared zthread StormLib zlib ${OPENSSL_LIBRARIES} ${OPENSSL_EXTRA_LIBRARIES}
)
link_directories (${CMAKE_INSTALL_PREFIX})
if(WIN32)
link_directories (${PROJECT_SOURCE_DIR}/src/dep/lib/static)
set(PSEUWOW_LIBS ${PSEUWOW_LIBS} Winmm)
endif()
if(UNIX)
set(EXECUTABLE_LINK_FLAGS "-pthread")
set(PSEUWOW_LIBS ${PSEUWOW_LIBS} GL Xxf86vm bz2)
endif()
add_subdirectory (DefScript)
add_subdirectory (GUI)
if(UNIX)
set(EXECUTABLE_LINK_FLAGS "-pthread")
endif()
add_executable (pseuwow
Realm/RealmSession.cpp
@ -42,7 +54,9 @@ RemoteController.cpp
SCPDatabase.cpp
)
# Link the executable to the libraries.
target_link_libraries (pseuwow PseuGUI DefScript irrklang irrlicht GL Xxf86vm shared zthread StormLib zlib bz2 ssh crypto)
target_link_libraries (pseuwow ${PSEUWOW_LIBS})
install(TARGETS pseuwow DESTINATION ${CMAKE_INSTALL_PREFIX})

View File

@ -1,4 +1,3 @@
#define _DEBUG 1
#include "common.h"
#include "Auth/Sha1.h"

View File

@ -1,5 +1,6 @@
include_directories (${PROJECT_SOURCE_DIR}/src/dep/include)
add_library(StormLib huffman/huff.cpp
set(STORMLIB_SOURCES huffman/huff.cpp
wave/wave.cpp
SAttrFile.cpp
SCommon.cpp
@ -12,9 +13,32 @@ add_library(StormLib huffman/huff.cpp
SFileOpenFileEx.cpp
SFileReadFile.cpp
SListFile.cpp
StormPortLinux.cpp
pklib/crc32_pk.c
pklib/explode.c
pklib/implode.c
misc/crc32.cpp
misc/md5.cpp)
misc/md5.cpp)
if(UNIX)
set(STORMLIB_SOURCES ${STORMLIB_SOURCES} StormPortLinux.cpp)
endif()
if(WIN32)
set(STORMLIB_SOURCES ${STORMLIB_SOURCES}
bzip2/blocksort.c
bzip2/bzip2.c
bzip2/bzip2recover.c
bzip2/bzlib.c
bzip2/compress.c
bzip2/crctable.c
bzip2/decompress.c
bzip2/dlltest.c
bzip2/huffman.c
bzip2/mk251.c
bzip2/randtable.c
bzip2/spewG.c
bzip2/unzcrash.c
)
endif()
add_library(StormLib ${STORMLIB_SOURCES})

View File

@ -73,21 +73,21 @@
// Z - S for static C library, D for multithreaded DLL C-library
//
#if defined(_MSC_VER) && !defined (__STORMLIB_SELF__)
#ifdef _DEBUG // DEBUG VERSIONS
#ifdef _DLL
#pragma comment(lib, "StormLibDAD.lib") // Debug Ansi Dynamic version
#else
#pragma comment(lib, "StormLibDAS.lib") // Debug Ansi Static version
#endif
#else // RELEASE VERSIONS
#ifdef _DLL
#pragma comment(lib, "StormLibRAD.lib") // Release Ansi Dynamic version
#else
#pragma comment(lib, "StormLibRAS.lib") // Release Ansi Static version
#endif
#endif
#endif
// #if defined(_MSC_VER) && !defined (__STORMLIB_SELF__)
// #ifdef _DEBUG // DEBUG VERSIONS
// #ifdef _DLL
// #pragma comment(lib, "StormLibDAD.lib") // Debug Ansi Dynamic version
// #else
// #pragma comment(lib, "StormLibDAS.lib") // Debug Ansi Static version
// #endif
// #else // RELEASE VERSIONS
// #ifdef _DLL
// #pragma comment(lib, "StormLibRAD.lib") // Release Ansi Dynamic version
// #else
// #pragma comment(lib, "StormLibRAS.lib") // Release Ansi Static version
// #endif
// #endif
// #endif
//-----------------------------------------------------------------------------
// Defines

View File

@ -1,3 +1,3 @@
include_directories (${PROJECT_SOURCE_DIR}/src/dep/include/irrklang)
add_library(irrklang
add_library(irrKlang
irrKlang.cpp)

View File

@ -1,5 +1,25 @@
include_directories (${PROJECT_SOURCE_DIR}/src/dep/include ${PROJECT_SOURCE_DIR}/src/dep/include/irrlicht)
add_library(irrlicht
if(WIN32)
set(LIBTYPE SHARED)
else()
set(LIBTYPE STATIC)
endif()
add_library(irrlicht ${LIBTYPE} # this may be considered a hack.
zlib/adler32.c
zlib/compress.c
zlib/crc32.c
zlib/deflate.c
zlib/gzio.c
zlib/infback.c
zlib/inffast.c
zlib/inflate.c
zlib/inftrees.c
zlib/trees.c
zlib/uncompr.c
zlib/zutil.c
libpng/example.c
libpng/pnggccrd.c
libpng/pngpread.c
@ -270,4 +290,5 @@ IBurningShader.cpp
Irrlicht.cpp
irrXML.cpp
os.cpp
)
)
SET_TARGET_PROPERTIES (irrlicht PROPERTIES DEFINE_SYMBOL "IRRLICHT_EXPORTS" )

View File

@ -27,6 +27,7 @@
#include <algorithm>
#include <deque>
#include <iterator>
namespace ZThread {

View File

@ -5,6 +5,14 @@ StuffExtract.cpp
)
# Link the executable to the libraries.
target_link_libraries (stuffextract shared StormLib zlib bz2)
set(STUFFEXTRACT_LIBS shared StormLib zlib)
if(UNIX)
list(APPEND STUFFEXTRACT_LIBS bz2)
endif()
if(WIN32)
list(APPEND STUFFEXTRACT_LIBS Winmm)
endif()
target_link_libraries (stuffextract ${STUFFEXTRACT_LIBS} )
install(TARGETS stuffextract DESTINATION ${CMAKE_INSTALL_PREFIX})

View File

@ -8,9 +8,20 @@ ${PROJECT_SOURCE_DIR}/src/Client/GUI/CImageLoaderBLP.cpp
${PROJECT_SOURCE_DIR}/src/Client/GUI/SImage.cpp
${PROJECT_SOURCE_DIR}/src/Client/GUI/MemoryInterface.cpp
${PROJECT_SOURCE_DIR}/src/Client/GUI/CMDHMemoryReadFile.cpp
${PROJECT_SOURCE_DIR}/src/Client/GUI/CBoneSceneNode.cpp
${PROJECT_SOURCE_DIR}/src/Client/GUI/SSkinnedMesh.cpp
)
# Link the executable to the libraries.
target_link_libraries (viewer shared irrlicht StormLib zthread GL Xxf86vm zlib bz2 )
set(VIEWER_LIBS shared irrlicht StormLib zthread zlib)
if(UNIX)
list(APPEND VIEWER_LIBS GL Xxf86vm bz2)
endif()
if(WIN32)
list(APPEND VIEWER_LIBS Winmm)
endif()
target_link_libraries (viewer ${VIEWER_LIBS} )
install(TARGETS viewer DESTINATION ${CMAKE_INSTALL_PREFIX})