Skip to content

Commit

Permalink
First major pass over target_link_libraries.
Browse files Browse the repository at this point in the history
This fixes the majority of #383. In order to do so, I began to reorder
some of the include directives as specified in #788 to facillitate
easier inspection of the dependencies. The work is not complete at all.
Further, I broke several dependencies where trivially possible by
changing uses of derived classes to base classes and moving virtual
function definitions into source files from headers.

The diff is unpleasant, I know :(
  • Loading branch information
Hoikas committed Jan 27, 2021
1 parent bbe26f9 commit cdfb418
Show file tree
Hide file tree
Showing 740 changed files with 5,368 additions and 4,350 deletions.
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ find_package(Python3 3.8 REQUIRED Interpreter Development)
find_package(Security)
find_package(Speex)
find_package(string_theory 2.0 REQUIRED)
include_directories(${STRING_THEORY_INCLUDE_DIRS}) # FIXME: make this less promiscuous
set(THREADS_PREFER_PTHREAD_FLAG TRUE)
find_package(Threads REQUIRED)
find_package(Vorbis REQUIRED)
find_package(VPX)
find_package(ZLIB REQUIRED)
Expand Down
4 changes: 0 additions & 4 deletions Sources/Plasma/Apps/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
include_directories("${PLASMA_SOURCE_ROOT}/Apps")
include_directories("${PLASMA_SOURCE_ROOT}/CoreLib")
include_directories("${PLASMA_SOURCE_ROOT}/FeatureLib")
include_directories("${PLASMA_SOURCE_ROOT}/FeatureLib/inc")
include_directories("${PLASMA_SOURCE_ROOT}/NucleusLib")
include_directories("${PLASMA_SOURCE_ROOT}/NucleusLib/inc")
include_directories("${PLASMA_SOURCE_ROOT}/PubUtilLib")
include_directories("${PLASMA_SOURCE_ROOT}/PubUtilLib/inc")

if(WIN32)
add_subdirectory(plClient)
Expand Down
156 changes: 55 additions & 101 deletions Sources/Plasma/Apps/plClient/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -73,111 +73,65 @@ add_executable(plClient WIN32 ${plClient_SOURCES} ${plClient_HEADERS}
${plClient_TEXT} ${plClient_RESOURCES}
${external_SCRIPTS} ${external_SOURCES} ${external_DAT}
)
target_link_libraries(
plClient
PRIVATE
CoreLib

# For the "all creatables"
pnNucleusInc
plPubUtilInc
pfFeatureInc

# Everything else used in this target.
pnDispatch
pnFactory
pnKeyedObject
pnMessage
pnSceneObject
plAgeLoader
plAnimation
plAudio
plAvatar
plClientResMgr
plDrawable
plFile
plGImage
plGLight
plInputCore
plMessage
plModifier
plNetClient
plNetCommon
plNetGameLib
plPhysX
plPipeline
plProgressMgr
plResMgr
plScene
plSDL
plStatGather
plStatusLog
plUnifiedTime
pfAnimation
pfAudio
pfCharacter
pfConsole
pfConsoleCore
pfCrashHandler
pfGameGUIMgr
pfJournalBook
pfLocalizationMgr
pfMoviePlayer
pfPasswordStore
pfPatcher
pfPython
CURL::libcurl
)

if(PLASMA_EXTERNAL_RELEASE)
set_target_properties(plClient PROPERTIES OUTPUT_NAME "UruExplorer")
endif(PLASMA_EXTERNAL_RELEASE)
target_link_libraries(plClient CoreLib)
target_link_libraries(plClient pfAnimation)
target_link_libraries(plClient pfAudio)
target_link_libraries(plClient pfCamera)
target_link_libraries(plClient pfCCR)
target_link_libraries(plClient pfCharacter)
target_link_libraries(plClient pfConditional)
target_link_libraries(plClient pfConsole)
target_link_libraries(plClient pfConsoleCore)
target_link_libraries(plClient pfCrashHandler)
target_link_libraries(plClient pfGameGUIMgr)
target_link_libraries(plClient pfGameScoreMgr)
target_link_libraries(plClient pfJournalBook)
target_link_libraries(plClient pfLocalizationMgr)
target_link_libraries(plClient pfMessage)
target_link_libraries(plClient pfMoviePlayer)
target_link_libraries(plClient pfPasswordStore)
target_link_libraries(plClient pfPython)
target_link_libraries(plClient pfSurface)
target_link_libraries(plClient plAgeDescription)
target_link_libraries(plClient plAgeLoader)
target_link_libraries(plClient plAnimation)
target_link_libraries(plClient plAudible)
target_link_libraries(plClient plAudio)
target_link_libraries(plClient plAudioCore)
target_link_libraries(plClient plAvatar)
target_link_libraries(plClient plClientResMgr)
target_link_libraries(plClient plClipboard)
#target_link_libraries(plClient plClientKey)
target_link_libraries(plClient plCompression)
target_link_libraries(plClient plContainer)
target_link_libraries(plClient plDrawable)
target_link_libraries(plClient plFile)
target_link_libraries(plClient plGImage)
target_link_libraries(plClient plGLight)
target_link_libraries(plClient plInputCore)
target_link_libraries(plClient plInterp)
target_link_libraries(plClient plIntersect)
target_link_libraries(plClient plMath)
target_link_libraries(plClient plMessage)
target_link_libraries(plClient plModifier)
target_link_libraries(plClient plNetClient)
target_link_libraries(plClient plNetClientComm)
target_link_libraries(plClient plNetClientRecorder)
target_link_libraries(plClient plNetCommon)
target_link_libraries(plClient plNetGameLib)
target_link_libraries(plClient plNetMessage)
target_link_libraries(plClient plNetTransport)
target_link_libraries(plClient plParticleSystem)
target_link_libraries(plClient plPhysical)
target_link_libraries(plClient plPhysX)
target_link_libraries(plClient plPipeline)
target_link_libraries(plClient plProgressMgr)
target_link_libraries(plClient plResMgr)
target_link_libraries(plClient plScene)
target_link_libraries(plClient plSDL)
target_link_libraries(plClient plSockets)
target_link_libraries(plClient plStatGather)
target_link_libraries(plClient plStatusLog)
target_link_libraries(plClient plStreamLogger)
target_link_libraries(plClient plSurface)
target_link_libraries(plClient plTransform)
target_link_libraries(plClient plUnifiedTime)
target_link_libraries(plClient plVault)
target_link_libraries(plClient pnAsyncCore)
target_link_libraries(plClient pnAsyncCoreExe)
target_link_libraries(plClient pnDispatch)
target_link_libraries(plClient pnEncryption)
target_link_libraries(plClient pnFactory)
target_link_libraries(plClient pnInputCore)
target_link_libraries(plClient pnKeyedObject)
target_link_libraries(plClient pnMessage)
target_link_libraries(plClient pnModifier)
target_link_libraries(plClient pnNetBase)
target_link_libraries(plClient pnNetCli)
target_link_libraries(plClient pnNetCommon)
target_link_libraries(plClient pnNetProtocol)
target_link_libraries(plClient pnNucleusInc)
target_link_libraries(plClient pnSceneObject)
target_link_libraries(plClient pnTimer)
target_link_libraries(plClient pnUtils)
target_link_libraries(plClient pnUUID)

target_link_libraries(plClient ${DirectX_LIBRARIES})
target_link_libraries(plClient CURL::libcurl)
target_link_libraries(plClient ${STRING_THEORY_LIBRARIES})

if(USE_VLD)
target_link_libraries(plClient ${VLD_LIBRARY})
endif()

if (WIN32)
target_link_libraries(plClient rpcrt4)
target_link_libraries(plClient version)
target_link_libraries(plClient vfw32)
target_link_libraries(plClient ws2_32)
target_link_libraries(plClient winmm)
target_link_libraries(plClient strmiids)
target_link_libraries(plClient crypt32)
target_link_libraries(plClient wldap32)
endif(WIN32)

install(
TARGETS plClient
Expand Down
Loading

0 comments on commit cdfb418

Please sign in to comment.