From c91eb23f92d460175a7c23155b0334e6bcf88ca2 Mon Sep 17 00:00:00 2001 From: Darryl Pogue Date: Fri, 28 Oct 2011 23:21:44 -0700 Subject: [PATCH] Clean up the linking mess in CMake. (Of the library variety, not the book variety... although that's still confusingly similar terminology) --- Sources/Plasma/Apps/plFileEncrypt/CMakeLists.txt | 2 +- Sources/Plasma/Apps/plFileSecure/CMakeLists.txt | 3 +-- Sources/Plasma/Apps/plFileSecure/main.cpp | 3 ++- Sources/Plasma/Apps/plLogDecrypt/CMakeLists.txt | 2 +- Sources/Plasma/Apps/plPythonPack/CMakeLists.txt | 2 +- Sources/Plasma/CoreLib/CMakeLists.txt | 3 +++ Sources/Plasma/NucleusLib/inc/CMakeLists.txt | 1 + Sources/Plasma/NucleusLib/pnDispatch/CMakeLists.txt | 5 +++-- Sources/Plasma/NucleusLib/pnFactory/CMakeLists.txt | 3 ++- Sources/Plasma/NucleusLib/pnKeyedObject/CMakeLists.txt | 1 + Sources/Plasma/NucleusLib/pnMessage/CMakeLists.txt | 1 + Sources/Plasma/NucleusLib/pnNetCommon/CMakeLists.txt | 1 + Sources/Plasma/NucleusLib/pnProduct/CMakeLists.txt | 2 +- Sources/Plasma/NucleusLib/pnTimer/CMakeLists.txt | 1 + Sources/Plasma/NucleusLib/pnUUID/CMakeLists.txt | 2 +- Sources/Plasma/PubUtilLib/plAudioCore/CMakeLists.txt | 1 + Sources/Plasma/PubUtilLib/plFile/CMakeLists.txt | 2 +- Sources/Plasma/PubUtilLib/plResMgr/CMakeLists.txt | 1 + Sources/Plasma/PubUtilLib/plStatusLog/CMakeLists.txt | 1 + 19 files changed, 25 insertions(+), 12 deletions(-) diff --git a/Sources/Plasma/Apps/plFileEncrypt/CMakeLists.txt b/Sources/Plasma/Apps/plFileEncrypt/CMakeLists.txt index e416ef88..b4fdd13f 100644 --- a/Sources/Plasma/Apps/plFileEncrypt/CMakeLists.txt +++ b/Sources/Plasma/Apps/plFileEncrypt/CMakeLists.txt @@ -12,6 +12,6 @@ set(plFileEncrypt_SOURCES ) add_executable(plFileEncrypt ${plFileEncrypt_SOURCES}) -target_link_libraries(plFileEncrypt CoreLib CoreLibExe plFile plUnifiedTime pnUUID pnProduct) +target_link_libraries(plFileEncrypt CoreLib CoreLibExe pnProduct plFile) source_group("Source Files" FILES ${plFileEncrypt_SOURCES}) diff --git a/Sources/Plasma/Apps/plFileSecure/CMakeLists.txt b/Sources/Plasma/Apps/plFileSecure/CMakeLists.txt index 31579f80..09500b00 100644 --- a/Sources/Plasma/Apps/plFileSecure/CMakeLists.txt +++ b/Sources/Plasma/Apps/plFileSecure/CMakeLists.txt @@ -12,7 +12,6 @@ set(plFileSecure_SOURCES ) add_executable(plFileSecure ${plFileSecure_SOURCES}) -target_link_libraries(plFileSecure CoreLib CoreLibExe plFile plUnifiedTime pnProduct pnUtils) -target_link_libraries(plFileSecure Rpcrt4) +target_link_libraries(plFileSecure CoreLib CoreLibExe pnProduct plFile) source_group("Source Files" FILES ${plFileSecure_SOURCES}) diff --git a/Sources/Plasma/Apps/plFileSecure/main.cpp b/Sources/Plasma/Apps/plFileSecure/main.cpp index e8b613cf..a55b58ed 100644 --- a/Sources/Plasma/Apps/plFileSecure/main.cpp +++ b/Sources/Plasma/Apps/plFileSecure/main.cpp @@ -42,10 +42,11 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "plFile/hsFiles.h" #include "plFile/plFileUtils.h" #include "plFile/plSecureStream.h" -#include "pnUtils/pnUtils.h" #include "pnProduct/pnProduct.h" #include "hsUtils.h" +#include "pnUUID/pnUUIDCreatable.h" + #include #include diff --git a/Sources/Plasma/Apps/plLogDecrypt/CMakeLists.txt b/Sources/Plasma/Apps/plLogDecrypt/CMakeLists.txt index d4c10dd2..9a62efdc 100644 --- a/Sources/Plasma/Apps/plLogDecrypt/CMakeLists.txt +++ b/Sources/Plasma/Apps/plLogDecrypt/CMakeLists.txt @@ -12,6 +12,6 @@ set(plLogDecrypt_SOURCES ) add_executable(plLogDecrypt ${plLogDecrypt_SOURCES}) -target_link_libraries(plLogDecrypt CoreLib CoreLibExe plFile plUnifiedTime plStatusLog pnProduct) +target_link_libraries(plLogDecrypt CoreLib CoreLibExe plStatusLog pnProduct) source_group("Source Files" FILES ${plLogDecrypt_SOURCES}) diff --git a/Sources/Plasma/Apps/plPythonPack/CMakeLists.txt b/Sources/Plasma/Apps/plPythonPack/CMakeLists.txt index ddc18ed3..3fd9cf70 100644 --- a/Sources/Plasma/Apps/plPythonPack/CMakeLists.txt +++ b/Sources/Plasma/Apps/plPythonPack/CMakeLists.txt @@ -13,7 +13,7 @@ set(plPythonPack_HEADERS ) add_executable(plPythonPack ${plPythonPack_SOURCES} ${plPythonPack_HEADERS}) -target_link_libraries(plPythonPack CoreLib CoreLibExe plFile plUnifiedTime) +target_link_libraries(plPythonPack CoreLib CoreLibExe plFile) if(PYTHON_DEBUG_LIBRARY) target_link_libraries(plPythonPack debug ${PYTHON_DEBUG_LIBRARY}) diff --git a/Sources/Plasma/CoreLib/CMakeLists.txt b/Sources/Plasma/CoreLib/CMakeLists.txt index 70150197..7de9b1ee 100644 --- a/Sources/Plasma/CoreLib/CMakeLists.txt +++ b/Sources/Plasma/CoreLib/CMakeLists.txt @@ -95,6 +95,9 @@ set(CoreLib_HEADERS ) add_library(CoreLib STATIC ${CoreLib_SOURCES} ${CoreLib_HEADERS}) +if(UNIX) + target_link_libraries(CoreLib pthread) +endif(UNIX) source_group("Source Files" FILES ${CoreLib_SOURCES}) source_group("Header Files" FILES ${CoreLib_HEADERS}) diff --git a/Sources/Plasma/NucleusLib/inc/CMakeLists.txt b/Sources/Plasma/NucleusLib/inc/CMakeLists.txt index 696f360f..51827345 100644 --- a/Sources/Plasma/NucleusLib/inc/CMakeLists.txt +++ b/Sources/Plasma/NucleusLib/inc/CMakeLists.txt @@ -30,6 +30,7 @@ set(pnNucleusInc_SOURCES ) add_library(pnNucleusInc STATIC ${pnNucleusInc_HEADERS} ${pnNucleusInc_SOURCES}) +target_link_libraries(pnNucleusInc CoreLib pnTimer) source_group("Header Files" FILES ${pnNucleusInc_HEADERS}) source_group("Source Files" FILES ${pnNucleusInc_SOURCES}) diff --git a/Sources/Plasma/NucleusLib/pnDispatch/CMakeLists.txt b/Sources/Plasma/NucleusLib/pnDispatch/CMakeLists.txt index 7e8eaf6e..8e6c6132 100644 --- a/Sources/Plasma/NucleusLib/pnDispatch/CMakeLists.txt +++ b/Sources/Plasma/NucleusLib/pnDispatch/CMakeLists.txt @@ -1,7 +1,7 @@ include_directories(../../CoreLib) include_directories(../../NucleusLib) include_directories(../../NucleusLib/inc) -include_directories("../../PubUtilLib") +include_directories(../../PubUtilLib) set(pnDispatch_SOURCES plDispatch.cpp @@ -15,6 +15,7 @@ set(pnDispatch_HEADERS ) add_library(pnDispatch STATIC ${pnDispatch_SOURCES} ${pnDispatch_HEADERS}) +target_link_libraries(pnDispatch pnNucleusInc) source_group("Source Files" FILES ${pnDispatch_SOURCES}) -source_group("Header Files" FILES ${pnDispatch_HEADERS}) \ No newline at end of file +source_group("Header Files" FILES ${pnDispatch_HEADERS}) diff --git a/Sources/Plasma/NucleusLib/pnFactory/CMakeLists.txt b/Sources/Plasma/NucleusLib/pnFactory/CMakeLists.txt index c636c17f..a8a243fa 100644 --- a/Sources/Plasma/NucleusLib/pnFactory/CMakeLists.txt +++ b/Sources/Plasma/NucleusLib/pnFactory/CMakeLists.txt @@ -13,6 +13,7 @@ set(pnFactory_HEADERS ) add_library(pnFactory STATIC ${pnFactory_SOURCES} ${pnFactory_HEADERS}) +target_link_libraries(pnFactory CoreLib) source_group("Source Files" FILES ${pnFactory_SOURCES}) -source_group("Header Files" FILES ${pnFactory_HEADERS}) \ No newline at end of file +source_group("Header Files" FILES ${pnFactory_HEADERS}) diff --git a/Sources/Plasma/NucleusLib/pnKeyedObject/CMakeLists.txt b/Sources/Plasma/NucleusLib/pnKeyedObject/CMakeLists.txt index 19b9b1de..17a81544 100644 --- a/Sources/Plasma/NucleusLib/pnKeyedObject/CMakeLists.txt +++ b/Sources/Plasma/NucleusLib/pnKeyedObject/CMakeLists.txt @@ -24,6 +24,7 @@ set(pnKeyedObject_SOURCES ) add_library(pnKeyedObject STATIC ${pnKeyedObject_HEADERS} ${pnKeyedObject_SOURCES}) +target_link_libraries(pnKeyedObject CoreLib pnMessage) source_group("Header Files" FILES ${pnKeyedObject_HEADERS}) source_group("Source Files" FILES ${pnKeyedObject_SOURCES}) diff --git a/Sources/Plasma/NucleusLib/pnMessage/CMakeLists.txt b/Sources/Plasma/NucleusLib/pnMessage/CMakeLists.txt index de4db1b5..29ed0d3d 100644 --- a/Sources/Plasma/NucleusLib/pnMessage/CMakeLists.txt +++ b/Sources/Plasma/NucleusLib/pnMessage/CMakeLists.txt @@ -59,6 +59,7 @@ set(pnMessage_SOURCES ) add_library(pnMessage STATIC ${pnMessage_HEADERS} ${pnMessage_SOURCES}) +target_link_libraries(pnMessage CoreLib pnNetCommon) source_group("Header Files" FILES ${pnMessage_HEADERS}) source_group("Source Files" FILES ${pnMessage_SOURCES}) diff --git a/Sources/Plasma/NucleusLib/pnNetCommon/CMakeLists.txt b/Sources/Plasma/NucleusLib/pnNetCommon/CMakeLists.txt index b88ce118..6487445f 100644 --- a/Sources/Plasma/NucleusLib/pnNetCommon/CMakeLists.txt +++ b/Sources/Plasma/NucleusLib/pnNetCommon/CMakeLists.txt @@ -33,6 +33,7 @@ set(pnNetCommon_SOURCES ) add_library(pnNetCommon STATIC ${pnNetCommon_HEADERS} ${pnNetCommon_SOURCES}) +target_link_libraries(pnNetCommon pnAddrInfo plStatusLog) source_group("Header Files" FILES ${pnNetCommon_HEADERS}) source_group("Source Files" FILES ${pnNetCommon_SOURCES}) diff --git a/Sources/Plasma/NucleusLib/pnProduct/CMakeLists.txt b/Sources/Plasma/NucleusLib/pnProduct/CMakeLists.txt index 6dd8d8f9..3b2cc202 100644 --- a/Sources/Plasma/NucleusLib/pnProduct/CMakeLists.txt +++ b/Sources/Plasma/NucleusLib/pnProduct/CMakeLists.txt @@ -20,7 +20,7 @@ set(pnProduct_PRIVATE add_library(pnProduct STATIC ${pnProduct_HEADERS} ${pnProduct_PRIVATE}) -target_link_libraries(pnProduct pnUUID) +target_link_libraries(pnProduct CoreLib pnUUID) source_group("Header Files" FILES ${pnProduct_HEADERS}) source_group("Private" FILES ${pnProduct_PRIVATE}) diff --git a/Sources/Plasma/NucleusLib/pnTimer/CMakeLists.txt b/Sources/Plasma/NucleusLib/pnTimer/CMakeLists.txt index 7989f994..e7202102 100644 --- a/Sources/Plasma/NucleusLib/pnTimer/CMakeLists.txt +++ b/Sources/Plasma/NucleusLib/pnTimer/CMakeLists.txt @@ -18,6 +18,7 @@ set(pnTimer_SOURCES ) add_library(pnTimer STATIC ${pnTimer_HEADERS} ${pnTimer_SOURCES}) +target_link_libraries(pnTimer CoreLib) source_group("Header Files" FILES ${pnTimer_HEADERS}) source_group("Source Files" FILES ${pnTimer_SOURCES}) diff --git a/Sources/Plasma/NucleusLib/pnUUID/CMakeLists.txt b/Sources/Plasma/NucleusLib/pnUUID/CMakeLists.txt index e1d435c7..bccb3d67 100644 --- a/Sources/Plasma/NucleusLib/pnUUID/CMakeLists.txt +++ b/Sources/Plasma/NucleusLib/pnUUID/CMakeLists.txt @@ -17,7 +17,7 @@ set(pnUUID_HEADERS ) add_library(pnUUID STATIC ${pnUUID_SOURCES} ${pnUUID_HEADERS}) -target_link_libraries(pnUUID pnFactory) +target_link_libraries(pnUUID CoreLib pnFactory) if(WIN32) target_link_libraries(pnUUID pnUtils) target_link_libraries(pnUUID Rpcrt4) diff --git a/Sources/Plasma/PubUtilLib/plAudioCore/CMakeLists.txt b/Sources/Plasma/PubUtilLib/plAudioCore/CMakeLists.txt index 59c221ec..d9f99d38 100644 --- a/Sources/Plasma/PubUtilLib/plAudioCore/CMakeLists.txt +++ b/Sources/Plasma/PubUtilLib/plAudioCore/CMakeLists.txt @@ -36,6 +36,7 @@ set(plAudioCore_HEADERS ) add_library(plAudioCore STATIC ${plAudioCore_SOURCES} ${plAudioCore_HEADERS}) +target_link_libraries(plAudioCore ogg vorbis vorbisfile) source_group("Source Files" FILES ${plAudioCore_SOURCES}) source_group("Header Files" FILES ${plAudioCore_HEADERS}) diff --git a/Sources/Plasma/PubUtilLib/plFile/CMakeLists.txt b/Sources/Plasma/PubUtilLib/plFile/CMakeLists.txt index 2e5be567..03bc9afe 100644 --- a/Sources/Plasma/PubUtilLib/plFile/CMakeLists.txt +++ b/Sources/Plasma/PubUtilLib/plFile/CMakeLists.txt @@ -35,7 +35,7 @@ set(plFile_HEADERS ) add_library(plFile STATIC ${plFile_SOURCES} ${plFile_HEADERS}) -target_link_libraries(plFile CoreLib ${ZLIB_LIBRARIES}) +target_link_libraries(plFile CoreLib plUnifiedTime ${ZLIB_LIBRARIES}) source_group("Source Files" FILES ${plFile_SOURCES}) source_group("Header Files" FILES ${plFile_HEADERS}) diff --git a/Sources/Plasma/PubUtilLib/plResMgr/CMakeLists.txt b/Sources/Plasma/PubUtilLib/plResMgr/CMakeLists.txt index abc69922..54b59dee 100644 --- a/Sources/Plasma/PubUtilLib/plResMgr/CMakeLists.txt +++ b/Sources/Plasma/PubUtilLib/plResMgr/CMakeLists.txt @@ -34,6 +34,7 @@ set(plResMgr_HEADERS ) add_library(plResMgr STATIC ${plResMgr_SOURCES} ${plResMgr_HEADERS}) +target_link_libraries(plResMgr CoreLib pnDispatch pnFactory pnKeyedObject pnMessage pnTimer plFile plStatusLog) source_group("Source Files" FILES ${plResMgr_SOURCES}) source_group("Header Files" FILES ${plResMgr_HEADERS}) diff --git a/Sources/Plasma/PubUtilLib/plStatusLog/CMakeLists.txt b/Sources/Plasma/PubUtilLib/plStatusLog/CMakeLists.txt index 2c425303..7ffc5080 100644 --- a/Sources/Plasma/PubUtilLib/plStatusLog/CMakeLists.txt +++ b/Sources/Plasma/PubUtilLib/plStatusLog/CMakeLists.txt @@ -16,6 +16,7 @@ set(plStatusLog_HEADERS ) add_library(plStatusLog STATIC ${plStatusLog_SOURCES} ${plStatusLog_HEADERS}) +target_link_libraries(plStatusLog CoreLib plFile plUnifiedTime) source_group("Source Files" FILES ${plStatusLog_SOURCES}) source_group("Header Files" FILES ${plStatusLog_HEADERS})