I am unable to compile.
Â
Code: Select all
Kleiman-ibook:trunk michael$ port installed cmake libpng SDL
The following ports are currently installed:
cmake @2.8.1_2 (active)
libpng @1.2.43_0 (active)
Kleiman-ibook:trunk michael$ port installed | grep -i sdl
libsdl @1.2.14_8+no_x11
libsdl @1.2.14_8+no_x11+universal (active)
libsdl_image @1.2.10_2+universal (active)
libsdl_mixer @1.2.11_0+universal (active)
libsdl_ttf @2.0.9_1+universal (active)
Kleiman-ibook:trunk michael$ cmake .
-- Loaded CMakeASMInformation - ASM support is still experimental, please report issues
-- Could NOT find SFML (missing: SFML_LIBRARY SFML_INCLUDE_DIR)
CMake Error at /opt/local/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:70 (MESSAGE):
Could NOT find SFML (missing: SFML_LIBRARY SFML_INCLUDE_DIR)
Call Stack (most recent call first):
CMakeScripts/FindSFML.cmake:78 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
CMakeLists.txt:44 (FIND_PACKAGE)
-- Configuring incomplete, errors occurred!
Kleiman-ibook:trunk michael$
What is SFML?
Â
10.5.8, PPC.
And I have my answer:
Â
http://www.sfml-dev.org/
Â
Downloaded the 1.6 universal binary tarball.
Put the frameworks into /opt/local/Library/Frameworks
Â
Yet I still get
Code: Select all
-- Checking whether CXX compiler has -isysroot
-- Checking whether CXX compiler has -isysroot - yes
-- Checking whether CXX compiler supports OSX deployment target flag
-- Checking whether CXX compiler supports OSX deployment target flag - yes
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Could NOT find SFML (missing: SFML_LIBRARY SFML_INCLUDE_DIR)
-- Found ZLIB: /usr/lib/libz.dylib
-- Found PNG: /opt/local/lib/libpng.dylib
CMake Error at /opt/local/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:70 (MESSAGE):
Could NOT find SFML (missing: SFML_LIBRARY SFML_INCLUDE_DIR)
Call Stack (most recent call first):
CMakeScripts/FindSFML.cmake:78 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
CMakeLists.txt:44 (FIND_PACKAGE)
-- Configuring incomplete, errors occurred!
Â
Code: Select all
Kleiman-ibook:trunk michael$ ls /opt/local/Library/Frameworks/
total 0
0 Python.framework/ 0 sfml-network.framework/
0 SFML.framework/ 0 sfml-system.framework/
0 sfml-audio.framework/ 0 sfml-window.framework/
0 sfml-graphics.framework/
Â
Python has been there for a while.
Â
Other things were found in /opt/local (it's where Macports puts everything).
Â
So, can someone help me understand CMakeScripts/FindSFML.cmake, so I can figure out how to tell it about /opt/local/Library/Frameworks?
Â
EDIT: Never mind, I found it.
Â
Code: Select all
SET(SFML_INCLUDE_SEARCH_DIR
~/Library/Frameworks
/Library/Frameworks
/usr/local/include/SFML
/usr/include/SFML
/usr/local/include
/usr/include
/sw/include/SFML # Fink
/sw/include
/opt/local/include/SFML # DarwinPorts
/opt/local/include
/opt/csw/include/SFML # Blastwave
/opt/csw/include
/opt/include/SFML
/opt/include
)
Â
Notice that it has the home and system Library/Frameworks (for Apple, and personal), but not the /opt/local/Library/Frameworks (for local system installs).
Â
For your patching pleasure. Feed this to patch -p0.
Â
Code: Select all
Kleiman-ibook:trunk michael$ diff -u CMakeScripts/FindSFML.cmake~ CMakeScripts/FindSFML.cmake
--- CMakeScripts/FindSFML.cmake~ 2010-06-18 21:28:20.000000000 -0700
+++ CMakeScripts/FindSFML.cmake 2010-06-21 21:17:22.000000000 -0700
@@ -26,6 +26,7 @@
/usr/include
/sw/include/SFML # Fink
/sw/include
+ /opt/local/Library/Frameworks
/opt/local/include/SFML # DarwinPorts
/opt/local/include
/opt/csw/include/SFML # Blastwave
@@ -41,6 +42,7 @@
/usr
/sw
/opt/local
+ /opt/local/Library/Frameworks
/opt/csw
/opt
)
Â
Crashes during compile:
Â
Code: Select all
Scanning dependencies of target vbamcore
[ 29%] Building CXX object CMakeFiles/vbamcore.dir/src/Util.o
[ 30%] Building CXX object CMakeFiles/vbamcore.dir/src/common/Patch.o
[ 31%] Building C object CMakeFiles/vbamcore.dir/src/common/memgzio.o
[ 32%] Building CXX object CMakeFiles/vbamcore.dir/src/gba/agbprint.o
[ 34%] Building CXX object CMakeFiles/vbamcore.dir/src/gba/bios.o
In file included from /Volumes/Michael/Documents/Development/vbam/trunk/src/gba/GBAinline.h:10,
from /Volumes/Michael/Documents/Development/vbam/trunk/src/gba/bios.cpp:7:
/Volumes/Michael/Documents/Development/vbam/trunk/src/gba/GBALink.h:3:28: error: SFML/Network.hpp: No such file or directory
/Volumes/Michael/Documents/Development/vbam/trunk/src/gba/GBALink.h:119: error: ‘sf’ has not been declared
/Volumes/Michael/Documents/Development/vbam/trunk/src/gba/GBALink.h:119: error: ‘IPAddress’ does not name a type
make[2]: *** [CMakeFiles/vbamcore.dir/src/gba/bios.o] Error 1
make[1]: *** [CMakeFiles/vbamcore.dir/all] Error 2
make: *** [all] Error 2
Kleiman-ibook:trunk michael$ ls /opt/local/Library/Frameworks/SFML.framework/Headers/
total 28
0 Audio/ 4 Graphics.hpp 4 System.hpp
4 Audio.hpp 0 Network/ 0 Window/
8 Config.hpp 4 Network.hpp 4 Window.hpp
0 Graphics/ 0 System/
Kleiman-ibook:trunk michael$
Â
I do not know my way around CMake.
I don't know what it's passing to the compiler, or why it can't be found.
Â
Anyone?
(NB: Somehow I posted a new reply to my last message as an edit.
I'm posting this so that if you saw my first message, and didn't see the second, that you know to go back and re-read that last message.)
Â
(Btw: Automatically turning a new post into an edit/append is BAD; I hope that's not what the forum is doing. It means that people who only read new posts will never see changes at the end of a thread.)
Alright, the next step in figuring out what's up. After all, why would it fail to find that one header in that file (Hmm, it's C++), but no other file gave any errors with SFML?
Â
Kleiman-ibook:trunk michael$ egrep SFML src//.h
src/gba/GBALink.h:#include
src/gba/GBASockClient.h:#include
Â
Ahh...
Â
Is it really the case that the only place this is used is for the link support? And then only the networking framework?
Â
Meanwhile, I found the CFLAGS:
Â
Code: Select all
Kleiman-ibook:trunk michael$ cat CMakeFiles/vbamcore.dir/flags.make
# CMAKE generated file: DO NOT EDIT!
# Generated by "Unix Makefiles" Generator, CMake Version 2.8
# compile C with /usr/bin/gcc
# compile CXX with /usr/bin/c++
C_FLAGS = -O3 -Wall -I/Volumes/Michael/Documents/Development/vbam/trunk/fex -I/opt/local/include -I/opt/local/include/SDL -DSYSCONFDIR='"/etc"' -DWITH_LIRC='0' -DVERSION='"1.8.0-SVN"' -DPKGDATADIR='"/usr/local/share/vbam"' -DPACKAGE=''
C_DEFINES = -DHAVE_NETINET_IN_H -DHAVE_ARPA_INET_H -DHAVE_ZLIB_H -DFINAL_VERSION -DSDL -DUSE_OPENGL -DBKPT_SUPPORT -DC_CORE
CXX_FLAGS = -O3 -Wall -I/Volumes/Michael/Documents/Development/vbam/trunk/fex -I/opt/local/include -I/opt/local/include/SDL -DSYSCONFDIR='"/etc"' -DWITH_LIRC='0' -DVERSION='"1.8.0-SVN"' -DPKGDATADIR='"/usr/local/share/vbam"' -DPACKAGE=''
CXX_DEFINES = -DHAVE_NETINET_IN_H -DHAVE_ARPA_INET_H -DHAVE_ZLIB_H -DFINAL_VERSION -DSDL -DUSE_OPENGL -DBKPT_SUPPORT -DC_CORE
Â
Lets play with those -I options just a bit ...
Â
(Cmake seems strange. The final makefiles are like assembly output from a compiler, compared to what a makefile normally looks like. )
Alright, the "workaround":
Â
Add "-F/opt/local/Library/Frameworks" to the two FLAGS lines.
Â
Now, this is a generated file. Where is the source that creates this file? (anyone?)