|
CMake |
Ariesnl
Member #2,902
November 2002
|
I tried several things to get a working makefile using CMake ( using allegro) CMakelist.txt 1cmake_minimum_required (VERSION 2.6)
2project (GUI_TEST)
3
4find_library(ALLEGRO_LIBRARY allegro_monolith-debug.dll HINTS "D:/Development/Allegro5/lib")
5
6include_directories(D:/Development/Allegro5/include)
7
8
9file(GLOB SOURCES "*.cpp")
10add_executable(GUI_TEST ${SOURCES})
11target_link_libraries(GUI_TEST PUBLIC ${ALLEGRO_LIBRARY} )
Perhaps one day we will find that the human factor is more complicated than space and time (Jean luc Picard) |
Edgar Reynaldo
Major Reynaldo
May 2007
|
Try -L ${ALLEGRO_LIBRARY_DIR} ${ALLEGRO_LIB} EDIT My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
Peter Hull
Member #1,136
March 2001
|
Would be better to use CMake's package facility. See https://www.allegro.cc/forums/thread/617453 and https://github.com/hiltonm/nostos/blob/master/cmake/FindAllegro.cmake .
|
Edgar Reynaldo
Major Reynaldo
May 2007
|
Rodolfo's current implementation doesn't include all libraries, doesn't handle the monolith, and I'm not sure how he calls it. A real FindAllegro.cmake would include MinGW and MSVC as well as MSYS and Linux pkg-config type searches. My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
Rodolfo Lam
Member #16,045
August 2015
|
Oh my... I have a really short t memory and totally forgot I was working on that... Indeed it is not an universal FindCmake for Allegro, made it so that it just worked in my case. For it to work in MSVC it would need to automatically fetch the NuGet Package for the project... However I don't know how to do that. I could look into adding the monolith version support to that... An ideal solution is to use a Config Module instead of a FindModule, however as always CMake docs are famous for being confusing and vague.
|
|