GENie icon indicating copy to clipboard operation
GENie copied to clipboard

Add CMake project generator

Open bkaradzic opened this issue 8 years ago • 9 comments

https://cmake.org/

bkaradzic avatar May 23 '16 16:05 bkaradzic

There is initial attempt at CMake project generator here: https://github.com/mamedev/mame/tree/master/3rdparty/genie/src/actions/cmake

bkaradzic avatar Jun 08 '16 05:06 bkaradzic

What is the state of the cmake generation? I've been wanting to use it but can't seem to get it to work with my configuration. I'm trying to build a project using SDL2, glm and glew. Using both vs2015 and gnu make files works perfectly for me. With the cmake option it has undefined references for everything from opengl.

Any pointers to figuring this out?

jonathansty avatar Jan 31 '17 21:01 jonathansty

It can generate cmake files that can be used with CLion IDE.

bkaradzic avatar Jan 31 '17 22:01 bkaradzic

It doesn't seem to have the correct libraries linked when I do it. for example when I put "SDL2" as a link option for the project. In the CMakeLists.txt there is no option that would link it for cmake

I have to add below information manually to the CmakeLists.txt

target_link_libraries(framework SDL2 )
target_link_libraries(framework SDL2main )
target_link_libraries(framework SDL2_image )
target_link_libraries(framework GLEW )
target_link_libraries(framework GLU )
target_link_libraries(framework GL )

jonathansty avatar Feb 01 '17 08:02 jonathansty

I meant used by CLion IDE just to display files in project, not build project.

bkaradzic avatar Feb 01 '17 16:02 bkaradzic

I've been modifying the CMake generator to be a bit more complete, and it manages to build my project completely - though it's only tested on my own private project (not on GitHub) on macOS, and it's not as clean as I'd like it. Feel free to take a look at my branch though to test it on your own project.

Lssikkes avatar Mar 01 '17 19:03 Lssikkes

@Lssikkes You can test with my projects bgfx, bnet, and bx (https://github.com/bkaradzic/bgfx), if your generator can generate cmake project for those and successfully build you can submit PR. :)

bkaradzic avatar Mar 01 '17 22:03 bkaradzic

Looks like I'll be working on getting this to fully work in the near future. (Full disclaimer: I'm currently generating gradle files along the gmake to finalize Android builds. Having cmake support would allow me to fully integrate the build into gradle as this is the usual method for Android builds).

@Lssikkes would you mind me using parts of your work as a base?

KageKirin avatar Jun 12 '19 07:06 KageKirin

No that's fine, go ahead.. I haven't been using the Cmake path for a while (currently switched fully to ninja for C++ on Linux and Windows), so I haven't been doing any development on it any longer. Feel free to take the code and expand on it!

On Wed, Jun 12, 2019 at 9:44 AM Christian Helmich [email protected] wrote:

Looks like I'll be working on getting this to fully work in the near future. (Full disclaimer: I'm currently generating gradle files along the gmake to finalize Android builds. Having cmake support would allow me to fully integrate the build into gradle as this is the usual method for Android builds).

@Lssikkes https://github.com/Lssikkes would you mind me using parts of your work as a base?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/bkaradzic/GENie/issues/191?email_source=notifications&email_token=ABJVV7W7PVH3YFDAQT7DHRTP2CSMNA5CNFSM4CESTYG2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXPRIBA#issuecomment-501158916, or mute the thread https://github.com/notifications/unsubscribe-auth/ABJVV7V4WFIA3CQG5DDBQJDP2CSMNANCNFSM4CESTYGQ .

Lssikkes avatar Jun 13 '19 06:06 Lssikkes