Hey guys.
Just wanted to let you know, that CMAKE_INSTALL_PREFIX is ignored in the latest Allegro 4.4 branch from GIT as of 08/12/2016. I found out when it ignored me and installed to c:/mingw despite having CMAKE_INSTALL_PREFIX defined to c:/LIBS4814Distro/Allegro443 in cmake-gui.
For now I can manually install Allegro, but it's kind of a pain. Especially since there's no uninstall target. Feature request?
Or if the changes are easy enough to make myself I don't mind, but I don't know much about the cmake build system or how it goes about installing things.
EDIT
When generating config files, cmake says this :
Guessed MinGW directory: c:/mingw
CMAKE_INSTALL_PREFIX: c:/mingw
So for some reason it is overriding my CMAKE_INSTALL_PREFIX as I have it set.
For some reason there's code to override it as you say, it probably should be removed... what it wants you to do is set the value of INSTALL_PREFIX instead, and then it'll set CMAKE_INSTALL_PREFIX to that value if it's not empty.
All I see other than CMAKE_INSTALL_PREFIX is FRAMEWORK_INSTALL_PREFIX. There's no entry for INSTALL_PREFIX listed in cmake-gui. I don't want to run cmake from the command line because there are so many options I want to specify. I'm building a distro for Allegro 4.4.3 as well as 5.2.1.
EDIT
Are you working on a patch for this? I might be able to come up with one. I grepped for INSTALL_PREFIX and I sort of see what it is doing.
EDIT2
I see the code you're talking about.
Basically, for MinGW, it ALWAYS sets CMAKE_INSTALL_PREFIX to c:/mingw. It doesnt' even get to the else(INSTALL_PREFIX STREQUAL "") code because it calls set (INSTALL_PREFIX "") right above it.
I dont' see why that code is needed, or even why it is there.
EDIT3
I made a patch that removes the useless INSTALL_PREFIX bit and makes CMake use MINGDIR for CMAKE_INSTALL_PREFIX if CMAKE_INSTALL_PREFIX doesn't exist.
Attached here : install_prefix_fix.diff
I tested a new install with my patch applied and it seems to respect CMAKE_INSTALL_PREFIX now.
There's a slightly better way to do it: https://github.com/liballeg/allegro5/commit/5fc337cf9225ce1706ff438a2dc5279cef79bcbf
Thanks for bringing this up.
You and your fancy CMake variables. (Kidding)
Thanks SiegeLord.