I am trying to compile on windows but I can't do it. You cmake file does not do everything by itself.
After some time I found this in cmake\modules\FindSFML.cmake:
# If SFML is not installed in a standard path, you can use the SFMLDIR CMake variable
# to tell CMake where SFML is.
It's quiet hidden, don't you think? But it works.
But then I get this:
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
FRIBIDI_LIBRARY
linked by target "mars" in directory C:/Users/Philipp/Documents/C++/MARS/src
TAG_LIBRARY
linked by target "mars" in directory C:/Users/Philipp/Documents/C++/MARS/src
This should not happen, since you provide those in your package.
So am I just suppose to provide the paths to those libs? I only found .dll's in the ext_libs_for_windows dir. I don't think I can link against those with MinGW? Do I have to build both libs by myself?
Edit:
Alright! I made it!
I build both libs (fribidi + taglib) by myself and installed them to my MinGW dir. I am sure I could have used the .dlls that are in the MARS folder but I wanted to have a clean build so I made sure everything is right.
Now I don't want to set the SFMLDIR. So I edited FindSFML.cmake so it can find my SFML build in my MinGW dir.
This is what I changed to make it work each time:
Index: cmake/modules/FindSFML.cmake
===================================================================
--- cmake/modules/FindSFML.cmake (Revision 200)
+++ cmake/modules/FindSFML.cmake (Arbeitskopie)
@@ -31,7 +31,8 @@
/opt/local/ # DarwinPorts
/opt/csw/ # Blastwave
/opt/
- ${SFMLDIR})
+ ${SFMLDIR}
+ C:/MinGW)
# check the version number
set(SFML_VERSION_OK TRUE)
@@ -68,7 +69,8 @@
/opt/local
/opt/csw
/opt
- ${SFMLDIR})
+ ${SFMLDIR}
+ C:/MinGW)
foreach(FIND_SFML_COMPONENT ${SFML_FIND_COMPONENTS})
string(TOLOWER ${FIND_SFML_COMPONENT} FIND_SFML_COMPONENT_LOWER)
string(TOUPPER ${FIND_SFML_COMPONENT} FIND_SFML_COMPONENT_UPPER)
Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt (Revision 200)
+++ CMakeLists.txt (Arbeitskopie)
@@ -29,7 +29,7 @@
include_directories(${OPENGL_INCLUDE_DIR})
# find the sfml2 headers and library
-find_package(SFML REQUIRED graphics system audio window)
+find_package(SFML REQUIRED audio graphics window system)
include_directories(${SFML_INCLUDE_DIR})
# Foundation library needed for apple
@@ -46,7 +46,7 @@
find_library(TAG_LIBRARY tag)
# Fribidi library needed for bi-directional texts
- find_library(FRIBIDI_LIBRARY fribidi)
+ find_library(FRIBIDI_LIBRARY fribidi-0)
# set the executable output path
if(APPLE)
Btw: I love your game!