tech-radar icon indicating copy to clipboard operation
tech-radar copied to clipboard

Add CMake build file

Open ywiyogo opened this issue 5 years ago • 3 comments

Allowing a developer to build with CMake without creating a build file and directory in each sample directory.

ywiyogo avatar Feb 28 '20 10:02 ywiyogo

Needs an ability to build both as static and shared (based on BUILD_SHARED_LIBS variable) https://cmake.org/cmake/help/v3.22/guide/tutorial/Selecting%20Static%20or%20Shared%20Libraries.html for details

hexedit avatar Feb 09 '22 00:02 hexedit

@hexedit I'm currently implementing CMake build files in another branch. It will at a minimum work with both static and shared versions of the wxWidgets library. Regarding building wxCharts itself as a shared library, help me understand the use case. The library is tiny so shipping it with the application shouldn't be a big problem. Also the API is not stable so a shared library may be problematic.

xleclercq avatar Feb 09 '22 11:02 xleclercq

In short term it's not necessary, right. But looking future it may be a good idea. Anyway it's only a suggestion :) For now I use it as submodule with glob-based source inclusion to main project, so static too :) PS. Another reason to have full CMake support is that one can include as subdirectory and just linking using core CMake features. PPS. CMake can be an only build system nowadays cuz it supports most generators like MSVC project, Eclipse project, Unix/MinGW makefiles, etc. with flexibility of Autotools for dynamic platform and environment configurations.

hexedit avatar Feb 09 '22 19:02 hexedit