Hello,
I've noticed several other people have requested how to use CMake with Code::Blocks and have been told to run a command like the following:
Quote from: seasoned_geek on November 23, 2021, 05:19:41 PM
[snipped]
cmake . -G "CodeBlocks - Unix Makefiles"
[snipped]
However, that command is part of Extra Generators [1] which is, as mentioned in the description, deprecated. According to the CMake documentation, "support for Extra Generators is deprecated and will be removed from a future version of CMake." Is anyone planning on making Code::Blocks work with CMake some other way? Thank you for your time.
[1]https://cmake.org/cmake/help/latest/generator/CodeBlocks.html
Wondering about this as well. This is making me hesitate to get too deep into Code::Blocks because CMake integration is a must.
Kitware seems to be encouraging IDE developers to integrate with their cmake-file-api: https://cmake.org/cmake/help/latest/manual/cmake-file-api.7.html
Since they never really supported native CB Projects. Them dropping support for CB Custom makefile projects are not a major loss.
Quote from: stahta01 on October 27, 2023, 09:58:12 PM
Since they never really supported native CB Projects. Them dropping support for CB Custom makefile projects are not a major loss.
From my point of view, I agree with you.
The generated cbp(from CMakefiles) is just a makefile, and not a real CB native Project file.
Is there any plan to support CMake integration then?
Quote from: inversesquare.zip on November 02, 2023, 06:33:30 PM
Is there any plan to support CMake integration then?
I don't use CMake in my own projects, so I don't have the motivation to improve this.
If you have the need, or other devs has the motivation, you/they can try to integrate it.
But I still don't know what does the "cmake-file-api" used for.
Quote from: inversesquare.zip on November 02, 2023, 06:33:30 PM
Is there any plan to support CMake integration then?
But you can still partly use this functionality in CB, by installing someone's plugin.
Whose plugin?
https://wiki.codeblocks.org/index.php/Project_Exporter
This website introduces it simply. I remember the latest version can be downloaded from github, but now I can't find the right address...
Quote from: Grit Clef on November 07, 2023, 01:23:36 PM
https://wiki.codeblocks.org/index.php/Project_Exporter
This website introduces it simply. I remember the latest version can be downloaded from github, but now I can't find the right address...
This plugin exports the project as CMake, but still plugin to import cmake is not available.
I've collected Project_Exporter source from github and added to https://github.com/josephch/CBProjectExporter . It looks good, needs a bit more polishing. Now manual edits of generated CMakeLists.txt is required to make it work.
The repo is not forked and I cannot find where it came from as you said it came from github.
Can you point me at where you "llected Project_Exporter source from github" so I look at the original source.
Thanks.
@christo
Thanks for your provision. You do need to modify the generated file, but that is more easier.
Quote from: Wkerry on November 09, 2023, 10:08:05 AM
The repo is not forked and I cannot find where it came from as you said it came from github.
Can you point me at where you "llected Project_Exporter source from github" so I look at the original source.
Thanks.
I got the information about github project https://github.com/acotty/CodeBlocks_Unofficial_Testing/ from https://forums.next.codeblocks.org/index.php/topic,25062.0/prev_next,next.html#new , but I could not access that repo. So I seached for forks of CodeBlocks_Unofficial_Testing and found https://github.com/stahta01/CodeBlocks_Unofficial_Testing . Copied the code from that repo https://github.com/stahta01/CodeBlocks_Unofficial_Testing/tree/master/src/plugins/contrib/ProjectExporter . Hope this helps.
Thanks.