MacBook-Pro-de-Paulo-Coutinho-2:build paulo$ ./build.sh
-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Checking whether C compiler has -isysroot
-- Checking whether C compiler has -isysroot - yes
-- Checking whether C compiler supports OSX deployment target flag
-- Checking whether C compiler supports OSX deployment target flag - yes
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- 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
Found SFML: /usr/local/include
CMake Error at CMakeLists.txt:19 (target_link_libraries):
Cannot specify link libraries for target
"/usr/local/lib/libsfml-system.dylib" which is not built by this project.
-- Configuring incomplete, errors occurred!
make: *** No targets specified and no makefile found. Stop.
Found SFML: /usr/local/include
CMake Error at CMakeLists.txt:19 (target_link_libraries):
Cannot specify link libraries for target "sfml-cmake" which is not built by
this project.
-- Configuring incomplete, errors occurred!
I want now learn how to link with the libraries in "library/mac" and "library/win32" using cmake and include the include files under "library" path too.I suggest you take a look at other CMake files, learn from them and keep reading the documentation (e.g. SFGUI (http://redmine.boxbox.org/projects/sfgui/repository/revisions/master/entry/CMakeLists.txt) or Thor (https://github.com/Bromeon/Thor/blob/master/CMakeLists.txt), keep in mind those are libraries not executable^s).
Can you help me?
MacBook-Pro-de-Paulo-Coutinho-2:build paulo$ ./sfml-project.app/Contents/MacOS/sfml-project
dyld: Library not loaded: @executable_path/../Frameworks/libsfml-system.2.dylib
Referenced from: /Users/paulo/Pessoal/workspaces/qt/sfml-cmake/build/./sfml-project.app/Contents/MacOS/sfml-project
Reason: image not found
Trace/BPT trap
Scanning dependencies of target sfml-project
[100%] Building CXX object CMakeFiles/sfml-project.dir/main.cpp.o
Linking CXX executable sfml-project.app/Contents/MacOS/sfml-project
Copying OS X content sfml-project.app/Contents/Frameworks/libsfml-audio.dylib
Copying OS X content sfml-project.app/Contents/Frameworks/libsfml-graphics.dylib
Copying OS X content sfml-project.app/Contents/Frameworks/libsfml-network.dylib
Copying OS X content sfml-project.app/Contents/Frameworks/libsfml-system.dylib
Copying OS X content sfml-project.app/Contents/Frameworks/libsfml-window.dylib
[100%] Built target sfml-project
MacBook-Pro-de-Paulo-Coutinho-2:build paulo$ ./rebuild.sh
-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Checking whether C compiler has -isysroot
-- Checking whether C compiler has -isysroot - yes
-- Checking whether C compiler supports OSX deployment target flag
-- Checking whether C compiler supports OSX deployment target flag - yes
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- 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/g++
-- Check for working CXX compiler: /usr/bin/g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
Found SFML: /Users/paulo/Pessoal/workspaces/qt/sfml-cmake/library/sfml/mac/include
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/paulo/Pessoal/workspaces/qt/sfml-cmake/build
Scanning dependencies of target sfml-project
[ 33%] Building CXX object CMakeFiles/sfml-project.dir/main.cpp.o
[ 66%] Building CXX object CMakeFiles/sfml-project.dir/sf_v8.cpp.o
[100%] Building CXX object CMakeFiles/sfml-project.dir/v8wrap.cpp.o
Linking CXX executable sfml-project.app/Contents/MacOS/sfml-project
[100%] Built target sfml-project
server:build paulo$ ./rebuild.sh
-- The C compiler identification is GNU 4.2.1
-- The CXX compiler identification is GNU 4.2.1
-- Checking whether C compiler has -isysroot
-- Checking whether C compiler has -isysroot - yes
-- Checking whether C compiler supports OSX deployment target flag
-- Checking whether C compiler supports OSX deployment target flag - yes
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- 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/g++
-- Check for working CXX compiler: /usr/bin/g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
Found SFML: /Users/paulo/Pessoal/workspaces/qt/sfml-cmake/library/sfml/mac/include
CMake Error at /Applications/CMake 2.8-9.app/Contents/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:97 (MESSAGE):
Could NOT find SNDFILE (missing: SNDFILE_LIBRARY)
Call Stack (most recent call first):
/Applications/CMake 2.8-9.app/Contents/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:288 (_FPHSA_FAILURE_MESSAGE)
build/cmake/modules/FindSNDFILE.cmake:20 (find_package_handle_standard_args)
CMakeLists.txt:44 (find_package)
-- Configuring incomplete, errors occurred!
make: *** No targets specified and no makefile found. Stop.
Is sndfile correctly installed ?Could NOT find SNDFILE (missing: SNDFILE_LIBRARY)