Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Build] Port whole project to CMake build system #259

Closed
10 tasks done
Wohlstand opened this issue Jun 25, 2018 · 5 comments
Closed
10 tasks done

[Build] Port whole project to CMake build system #259

Wohlstand opened this issue Jun 25, 2018 · 5 comments
Assignees
Labels
enhancement Priority - major Task has a Major priority. Has a high importance! task list List of little tasks

Comments

@Wohlstand
Copy link
Member

Wohlstand commented Jun 25, 2018

Port everything to CMake and completely drop support for QMake build system

Why

  • Current build system is overfilled with clunky workarounds and not friendly for developers
  • QMake's functionality lacks lot of features are can be useful especially for libraries and hardware-dependent things
  • Because of QMake's functionality, lot of things are done in BASH/BAT scripts
  • The complete existing build system is hard to maintain

To do

  • Basic build
  • Dependencies bootstrapping
  • Improve library linking interface thing
  • Linux deployment
  • macOS deployment
  • Windows deployment
  • Optimize libraries linking process
  • [ ] 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: Add ability to compile set of shared libraries AudioCodecs#5)
  • Implement lupdate from the CMake directly without of relying on old QMake projects
  • Change the build instruction to fit new CMake build system. Put old build guide into the separated page
  • Remove old build system. In the guide mark the last commit that still use legacy build system and refer the "Old build manual" article.
@Wohlstand
Copy link
Member Author

Wohlstand commented Jun 25, 2018

One note to optimize the library linking:

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})

@Wohlstand
Copy link
Member Author

Windows deployment note

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

@Wohlstand
Copy link
Member Author

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.

@Wohlstand Wohlstand added Priority - major Task has a Major priority. Has a high importance! and removed Priority - normal labels Jun 29, 2018
@Wohlstand
Copy link
Member Author

Since recent moment, QMake build support has been completely removed.

@Wohlstand Wohlstand changed the title Port whole project to CMake build system [Build] Port whole project to CMake build system Nov 8, 2018
@Wohlstand
Copy link
Member Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Priority - major Task has a Major priority. Has a high importance! task list List of little tasks
Projects
None yet
Development

No branches or pull requests

1 participant