-
Notifications
You must be signed in to change notification settings - Fork 26
Compilation error with custom Allegro 4 include dir #73
Comments
This is a bug in our CMakeLists.txt. I will go about submitting a PR tomorrow. |
Is it a matter of adding |
Oh, I just realized also that the following line in
If I'm linking to an Allegro library somewhere else,
Didn't mention this before since I modified this file to get it to work and forgot about it. |
The first issue with the include path is fixed by cab1803. Regarding the second issue, is there a standard environment variable that is used in other build systems to specify the path to the allegro-config binary? Adding the directory to your path during the invocation of cmake should also help, without you needing to modify any files. |
I don't think Allegro 4 had a standard variable for its binaries. They're generally expected to be in the path, thereore I would add your local A4 directory to your path variable. |
I'm not sure if it's necessary to have In my case this is useful because I'm actually cross-compiling, so I'm not actually installing A4, but just linking to it. |
This is a good idea. |
Hi there. I'm trying to compile this project on OSX (10.12.6), but I've got a bit of a weird setup. Allegro 4 cannot easily be compiled anymore on modern OSX, so I compiled a version using the OSX 10.4 SDK that will run on modern versions. (Last time I tried, the brew allegro4 install script was broken.)
Since I'm using this build of Allegro 4, I need to ensure that it can find the library and include files, which I currently do by configuring with:
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -DBUILD_SHARED_LIBS:BOOL=ON -DBUILD_ALLEGRO4:BOOL=ON -DALLEGRO_INCLUDE_DIR="/Users/msikma/liballeg.4.4.2-osx/include/" -DALLEGRO_LIBRARY="/Users/msikma/liballeg.4.4.2-osx/lib/liballeg.4.4.2.dylib" ..
However, as soon as the compilation reaches Allegro, it errors out:
If I run
make -n
to find the command it's trying to run, and manually add-I/Users/msikma/liballeg.4.4.2-osx/include
to it, the compilation succeeds.Is there any way I could add the passed
ALLEGRO_INCLUDE_DIR
to the compilation commands during generation? I'm not really very familiar with Cmake so any help would be appreciated...The text was updated successfully, but these errors were encountered: