Closed Wohlstand closed 5 years ago
Instaed of using things like this:
list(APPEND PGE_MUSPLAY_LINK_LIBS
${SDL_MIXER_X_LIB}
FLAC$<$<CONFIG:Debug>:d>
opusfile$<$<CONFIG:Debug>:d>
opus$<$<CONFIG:Debug>:d>
vorbisfile$<$<CONFIG:Debug>:d>
vorbis$<$<CONFIG:Debug>:d>
ogg$<$<CONFIG:Debug>:d>
mad$<$<CONFIG:Debug>:d>
id3tag$<$<CONFIG:Debug>:d>
modplug$<$<CONFIG:Debug>:d>
ADLMIDI$<$<CONFIG:Debug>:d>
OPNMIDI$<$<CONFIG:Debug>:d>
timidity$<$<CONFIG:Debug>:d>
gme$<$<CONFIG:Debug>:d>
zlib$<$<CONFIG:Debug>:d>
)
Is a much better way to link dependencies (already used in libADLMIDI and libOPNMIDI projects, as example):
add_library(ADLMIDI_IF INTERFACE)
if(libADLMIDI_SHARED)
target_link_libraries(ADLMIDI_IF INTERFACE ADLMIDI_shared)
else()
target_link_libraries(ADLMIDI_IF INTERFACE ADLMIDI_static)
endif()
# ...
target_link_libraries(adlmidiplay ADLMIDI_IF ${SDL2_LIBRARY})
As Windows builds are still rely on shared libraries, is need to use WinDeployQt tool to pull all dependent libraries. To easier make this, it's an example function made in another project:
https://github.com/equalsraf/neovim-qt/blob/master/cmake/WinDeployQt.cmake
https://ci.appveyor.com/project/Wohlstand/pge-project/build/0.4.0.3.1303 First Windows build completely deployed through the CMake run.
The only left a macOS deployment to be ready to completely drop away the old building system.
Since recent moment, QMake build support has been completely removed.
Okay, looks like the whole CMake based system is works fine, so, I'll close this. Any future CMake build related works will be done in separated tasks.
Port everything to CMake and completely drop support for QMake build system
Why
To do
[ ] Allow dependencies to be built as shared libraries to allow easier hot-swap of them while developing some things(This item was moved to here: https://github.com/WohlSoft/AudioCodecs/issues/5)lupdate
from the CMake directly without of relying on old QMake projects