diff --git a/CMakeLists.txt b/CMakeLists.txt index e38406e2..242a83dd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -69,14 +69,16 @@ endif() include(PrecompiledHeader) #Precompiled Header helper macros -# libCurl isn't smart enough to detect this for us, so we have to configure it ourselves -option(CURL_IS_STATIC "Using the static version of libcurl?" ON) -if(CURL_IS_STATIC) - add_definitions(-DCURL_STATICLIB) -endif(CURL_IS_STATIC) - -# Same story for expat -option(EXPAT_IS_STATIC "Using the static version of libexpat" ON) +if(WIN32) + # libCurl isn't smart enough to detect this for us, so we have to configure it ourselves + option(CURL_IS_STATIC "Using the static version of libcurl?" ON) + if(CURL_IS_STATIC) + add_definitions(-DCURL_STATICLIB) + endif(CURL_IS_STATIC) + + # Same story for expat + option(EXPAT_IS_STATIC "Using the static version of libexpat" ON) +endif(WIN32) option(PLASMA_EXTERNAL_RELEASE "Is this release intended for the general public?" OFF) if(PLASMA_EXTERNAL_RELEASE) diff --git a/Sources/Plasma/FeatureLib/pfCamera/plCameraModifier.cpp b/Sources/Plasma/FeatureLib/pfCamera/plCameraModifier.cpp index a6f2a0e4..01cf2d45 100644 --- a/Sources/Plasma/FeatureLib/pfCamera/plCameraModifier.cpp +++ b/Sources/Plasma/FeatureLib/pfCamera/plCameraModifier.cpp @@ -65,6 +65,8 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "plAvatar/plArmatureMod.h" #include "plAvatar/plPhysicalControllerCore.h" +#include + // new stuff plCameraModifier1::plCameraModifier1() : diff --git a/Sources/Plasma/FeatureLib/pfGameMgr/Pch.h b/Sources/Plasma/FeatureLib/pfGameMgr/Pch.h index 5e8c793b..756f731a 100644 --- a/Sources/Plasma/FeatureLib/pfGameMgr/Pch.h +++ b/Sources/Plasma/FeatureLib/pfGameMgr/Pch.h @@ -70,4 +70,8 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "pfGameMgr.h" #include "Intern.h" +#ifdef HS_BUILD_FOR_OSX +#include +#else #include +#endif diff --git a/Sources/Plasma/FeatureLib/pfLocalizationMgr/CMakeLists.txt b/Sources/Plasma/FeatureLib/pfLocalizationMgr/CMakeLists.txt index a810b69c..06c50272 100644 --- a/Sources/Plasma/FeatureLib/pfLocalizationMgr/CMakeLists.txt +++ b/Sources/Plasma/FeatureLib/pfLocalizationMgr/CMakeLists.txt @@ -3,9 +3,12 @@ include_directories(../../PubUtilLib) include_directories(${EXPAT_INCLUDE_DIR}) -add_definitions(-DWIN32) -if(EXPAT_IS_STATIC) - add_definitions(-DXML_STATIC) +if(WIN32) + add_definitions(-DWIN32) + + if(EXPAT_IS_STATIC) + add_definitions(-DXML_STATIC) + endif() endif() set(pfLocalizationMgr_SOURCES diff --git a/Sources/Plasma/NucleusLib/pnAsyncCoreExe/Pch.h b/Sources/Plasma/NucleusLib/pnAsyncCoreExe/Pch.h index 3c633fea..26c414dd 100644 --- a/Sources/Plasma/NucleusLib/pnAsyncCoreExe/Pch.h +++ b/Sources/Plasma/NucleusLib/pnAsyncCoreExe/Pch.h @@ -61,4 +61,9 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "Private/Unix/pnAceUx.h" #include + +#ifdef HS_BUILD_FOR_OSX +#include +#else #include +#endif diff --git a/Sources/Plasma/NucleusLib/pnNetCli/Pch.h b/Sources/Plasma/NucleusLib/pnNetCli/Pch.h index 704e6a6c..c021151e 100644 --- a/Sources/Plasma/NucleusLib/pnNetCli/Pch.h +++ b/Sources/Plasma/NucleusLib/pnNetCli/Pch.h @@ -59,4 +59,8 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "pnNetCli.h" #include "Intern.h" +#ifdef HS_BUILD_FOR_OSX +#include +#else #include +#endif diff --git a/Sources/Plasma/NucleusLib/pnNetProtocol/Pch.h b/Sources/Plasma/NucleusLib/pnNetProtocol/Pch.h index 62e7d06f..394706a1 100644 --- a/Sources/Plasma/NucleusLib/pnNetProtocol/Pch.h +++ b/Sources/Plasma/NucleusLib/pnNetProtocol/Pch.h @@ -64,5 +64,8 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "Private/pnNpAllIncludes.h" #include "Intern.h" - +#ifdef HS_BUILD_FOR_OSX +#include +#else #include +#endif diff --git a/Sources/Plasma/NucleusLib/pnUtils/Pch.h b/Sources/Plasma/NucleusLib/pnUtils/Pch.h index 9923b637..f23899f0 100644 --- a/Sources/Plasma/NucleusLib/pnUtils/Pch.h +++ b/Sources/Plasma/NucleusLib/pnUtils/Pch.h @@ -51,7 +51,11 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "pnUtCoreLib.h" // must be first in list #include "pnUtPragma.h" +#ifdef HS_BUILD_FOR_OSX +#include +#else #include +#endif #ifdef HS_BUILD_FOR_WIN32 #pragma warning(push, 3) diff --git a/Sources/Plasma/PubUtilLib/plAgeDescription/plAgeDescription.cpp b/Sources/Plasma/PubUtilLib/plAgeDescription/plAgeDescription.cpp index 6563c373..62f765b9 100644 --- a/Sources/Plasma/PubUtilLib/plAgeDescription/plAgeDescription.cpp +++ b/Sources/Plasma/PubUtilLib/plAgeDescription/plAgeDescription.cpp @@ -46,8 +46,10 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "plFile/plInitFileReader.h" #include "plFile/plEncryptedStream.h" #include "hsStringTokenizer.h" + #include #include +#include const uint32_t plAgePage::kInvalidSeqSuffix = (uint32_t)-1; diff --git a/Sources/Plasma/PubUtilLib/plAvatar/plAvatarMgr.cpp b/Sources/Plasma/PubUtilLib/plAvatar/plAvatarMgr.cpp index 23e76f89..5a04ea54 100644 --- a/Sources/Plasma/PubUtilLib/plAvatar/plAvatarMgr.cpp +++ b/Sources/Plasma/PubUtilLib/plAvatar/plAvatarMgr.cpp @@ -41,8 +41,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com *==LICENSE==*/ #pragma warning(disable: 4503 4786) -#include - #include "plAvatarMgr.h" // local @@ -87,6 +85,9 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "pnMessage/plTimeMsg.h" #include "plStatusLog/plStatusLog.h" +#include +#include + // The static single instance, allocated on demand by GetInstance() plAvatarMgr *plAvatarMgr::fInstance = nil; diff --git a/Sources/Plasma/PubUtilLib/plNetClient/plNetClientMgr.cpp b/Sources/Plasma/PubUtilLib/plNetClient/plNetClientMgr.cpp index b9853f9f..6fdfa1af 100644 --- a/Sources/Plasma/PubUtilLib/plNetClient/plNetClientMgr.cpp +++ b/Sources/Plasma/PubUtilLib/plNetClient/plNetClientMgr.cpp @@ -111,7 +111,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include #include - +#include //////////////////////////////////////////////////////////////////// diff --git a/Sources/Plasma/PubUtilLib/plNetClientComm/plNetClientComm.cpp b/Sources/Plasma/PubUtilLib/plNetClientComm/plNetClientComm.cpp index 9ae3b9c4..68744567 100644 --- a/Sources/Plasma/PubUtilLib/plNetClientComm/plNetClientComm.cpp +++ b/Sources/Plasma/PubUtilLib/plNetClientComm/plNetClientComm.cpp @@ -66,7 +66,11 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "hsResMgr.h" +#ifdef HS_BUILD_FOR_OSX +#include +#else #include +#endif extern bool gDataServerLocal; diff --git a/Sources/Plasma/PubUtilLib/plNetGameLib/Pch.h b/Sources/Plasma/PubUtilLib/plNetGameLib/Pch.h index 0e4e0e90..a4027425 100644 --- a/Sources/Plasma/PubUtilLib/plNetGameLib/Pch.h +++ b/Sources/Plasma/PubUtilLib/plNetGameLib/Pch.h @@ -69,4 +69,8 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "Private/plNglAllIncludes.h" #include "Intern.h" +#ifdef HS_BUILD_FOR_OSX +#include +#else #include +#endif diff --git a/Sources/Plasma/PubUtilLib/plSDL/plStateVariable.cpp b/Sources/Plasma/PubUtilLib/plSDL/plStateVariable.cpp index 0fefdb9d..3fc632fd 100644 --- a/Sources/Plasma/PubUtilLib/plSDL/plStateVariable.cpp +++ b/Sources/Plasma/PubUtilLib/plSDL/plStateVariable.cpp @@ -39,8 +39,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ -#include -#include #include "hsStream.h" #include "hsTimer.h" #include "plSDL.h" @@ -61,6 +59,9 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "plResMgr/plResManager.h" #include "plUnifiedTime/plClientUnifiedTime.h" +#include +#include +#include /***************************************************************************** * diff --git a/Sources/Plasma/PubUtilLib/plVault/Pch.h b/Sources/Plasma/PubUtilLib/plVault/Pch.h index 338d5508..e5435cdb 100644 --- a/Sources/Plasma/PubUtilLib/plVault/Pch.h +++ b/Sources/Plasma/PubUtilLib/plVault/Pch.h @@ -93,4 +93,8 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "Intern.h" +#ifdef HS_BUILD_FOR_OSX +#include +#else #include +#endif diff --git a/Sources/Tools/plFontConverter/CMakeLists.txt b/Sources/Tools/plFontConverter/CMakeLists.txt index 8845dd44..27ad884b 100644 --- a/Sources/Tools/plFontConverter/CMakeLists.txt +++ b/Sources/Tools/plFontConverter/CMakeLists.txt @@ -40,9 +40,10 @@ qt5_wrap_ui(plFontConverter_UIC ${plFontConverter_UIC_SOURCES}) include_directories(${CMAKE_CURRENT_SOURCE_DIR}) include_directories(${CMAKE_CURRENT_BINARY_DIR}) -add_executable(plFontConverter WIN32 ${plFontConverter_HEADERS} - ${plFontConverter_SOURCES} ${plFontConverter_RCC} - ${plFontConverter_UIC} ${plFontConverter_MOC}) +add_executable(plFontConverter WIN32 MACOSX_BUNDLE + ${plFontConverter_HEADERS} ${plFontConverter_SOURCES} + ${plFontConverter_RCC} ${plFontConverter_UIC} + ${plFontConverter_MOC}) target_link_libraries(plFontConverter CoreLib) target_link_libraries(plFontConverter pnKeyedObject) diff --git a/Sources/Tools/plLocalizationEditor/CMakeLists.txt b/Sources/Tools/plLocalizationEditor/CMakeLists.txt index 149e2725..55665b36 100644 --- a/Sources/Tools/plLocalizationEditor/CMakeLists.txt +++ b/Sources/Tools/plLocalizationEditor/CMakeLists.txt @@ -42,9 +42,10 @@ qt5_wrap_ui(plLocalizationEditor_UIC ${plLocalizationEditor_UIC_SOURCES}) include_directories(${CMAKE_CURRENT_SOURCE_DIR}) include_directories(${CMAKE_CURRENT_BINARY_DIR}) -add_executable(plLocalizationEditor WIN32 ${plLocalizationEditor_HEADERS} - ${plLocalizationEditor_SOURCES} ${plLocalizationEditor_RCC} - ${plLocalizationEditor_UIC} ${plLocalizationEditor_MOC}) +add_executable(plLocalizationEditor WIN32 MACOSX_BUNDLE + ${plLocalizationEditor_HEADERS} ${plLocalizationEditor_SOURCES} + ${plLocalizationEditor_RCC} ${plLocalizationEditor_UIC} + ${plLocalizationEditor_MOC}) target_link_libraries(plLocalizationEditor CoreLib) target_link_libraries(plLocalizationEditor pnSceneObject) diff --git a/Sources/Tools/plResBrowser/CMakeLists.txt b/Sources/Tools/plResBrowser/CMakeLists.txt index 624b3401..a2807991 100644 --- a/Sources/Tools/plResBrowser/CMakeLists.txt +++ b/Sources/Tools/plResBrowser/CMakeLists.txt @@ -44,7 +44,8 @@ qt5_wrap_ui(plResBrowser_UIC ${plResBrowser_UIC_SOURCES}) include_directories(${CMAKE_CURRENT_SOURCE_DIR}) include_directories(${CMAKE_CURRENT_BINARY_DIR}) -add_executable(plResBrowser WIN32 ${plResBrowser_SOURCES} ${plResBrowser_HEADERS} +add_executable(plResBrowser WIN32 MACOSX_BUNDLE + ${plResBrowser_SOURCES} ${plResBrowser_HEADERS} ${plResBrowser_RCC} ${plResBrowser_UIC} ${plResBrowser_MOC}) target_link_libraries(plResBrowser CoreLib)