tgui master.

Started by DJuego, 10 April 2018, 22:25:47

DJuego

Hi! I just registered. Thank you for tgui! I've used it several times and it's great. I always build the master branch and I have not had problems for a long time. I use a script. However in the last weeks a problem has appeared.


Instalacion TGUI en x64
-- The C compiler identification is MSVC 19.13.26128.0
-- The CXX compiler identification is MSVC 19.13.26128.0
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Enterprise/VC/Tools/MSVC/14.13.26128/bin/Hostx64/x64/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Enterprise/VC/Tools/MSVC/14.13.26128/bin/Hostx64/x64/cl.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Enterprise/VC/Tools/MSVC/14.13.26128/bin/Hostx64/x64/cl.exe
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Enterprise/VC/Tools/MSVC/14.13.26128/bin/Hostx64/x64/cl.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of void*
-- Check size of void* - done
CMake Warning at CMakeLists.txt:171 (find_package):
  By not providing "FindSFML.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "SFML", but
  CMake did not find one.

  Could not find a package configuration file provided by "SFML" (requested
  version 2) with any of the following names:

    SFMLConfig.cmake
    sfml-config.cmake

  Add the installation prefix of "SFML" to CMAKE_PREFIX_PATH or set
  "SFML_DIR" to a directory containing one of the above files.  If "SFML"
  provides a separate development package or SDK, be sure it has been
  installed.


CMake Error at CMakeLists.txt:184 (message):
  CMake couldn't find SFML.

  Either set SFML_DIR to the directory containing SFMLConfig.cmake or set the
  SFML_ROOT entry to SFML's root directory (containing "include" and "lib"
  directories).


-- Configuring incomplete, errors occurred!
See also "P:/Compilados/x32-x64/TRABAJO_MSVC2017_x64/TGUI/builds/debug/CMakeFiles/CMakeOutput.log".




I do not know if they are due to changes in SFML (branch master) or tgui (branch master). (?) I work in Windows 10 x64 with Visual Studio 2017.
Interestingly, if I configure and generate the files with cmake-gui (without changes), it works!

Any idea? Thanks!

DJuego

texus

#1
Which branch are you using exactly, 0.7 or 0.8-dev (there isn't a master branch)?

With the recent changes to the SFML cmake script I had to adapt my own cmake scripts and it is possible some bug slipped in.

How did cmake find SFML before? Didn't you already have to set SFML_ROOT manually? If you are setting SFML_ROOT and it isn't finding SFML then it means something is broken with my new way of setting CMAKE_MODULE_PATH, you could try to manually set it to the TGUI/cmake/Modules folder and check if that solves the problem.
But for finding the latest SFML version it is recommended to just keep SFML_ROOT and CMAKE_MODULE_PATH empty and set the SFML_DIR to the SFML build directory (or the location where it was installed).

DJuego

texus, Thank you for your very swift answer! I am using 0.8-dev (l like the danger).

Yes. I am using SFML_ROOT.

With "Debug" release

cmake -G 'NMake Makefiles' -D CMAKE_BUILD_TYPE=Debug -D CMAKE_MODULE_PATH=$DIRECTORIO_INSTALACION/SFML/cmake/Modules -D CMAKE_INSTALL_PREFIX=$DIRECTORIO_INSTALACION_LIBRERIA -D SFML_INCLUDE_DIR=$DIRECTORIO_INSTALACION/SFML/include -D SFML_ROOT=$DIRECTORIO_INSTALACION/SFML -D TGUI_BUILD_DOC:BOOL=ON -D TGUI_BUILD_EXAMPLES:BOOL=ON -D TGUI_BUILD_TESTS:BOOL=OFF -D TGUI_BUILD_GUI_BUILDER:BOOL=ON -D DOXYGEN_EXECUTABLE=$ARCHIVO_DOXYGEN ../.. [/td]


With "Release" release
cmake -G 'NMake Makefiles' -D CMAKE_BUILD_TYPE=Release -D CMAKE_MODULE_PATH=$DIRECTORIO_INSTALACION/SFML/cmake/Modules -D CMAKE_INSTALL_PREFIX=$DIRECTORIO_INSTALACION_LIBRERIA -D SFML_INCLUDE_DIR=$DIRECTORIO_INSTALACION/SFML/include -D SFML_ROOT=$DIRECTORIO_INSTALACION/SFML -D TGUI_BUILD_DOC:BOOL=ON -D TGUI_BUILD_EXAMPLES:BOOL=ON -D TGUI_BUILD_TESTS:BOOL=OFF -D TGUI_BUILD_GUI_BUILDER:BOOL=ON -D DOXYGEN_EXECUTABLE=$ARCHIVO_DOXYGEN ../..


Now i have changed to:

cmake -G 'NMake Makefiles' -D CMAKE_BUILD_TYPE=Debug -D CMAKE_MODULE_PATH=$DIRECTORIO_INSTALACION/SFML/cmake/Modules -D CMAKE_INSTALL_PREFIX=$DIRECTORIO_INSTALACION_LIBRERIA -D SFML_INCLUDE_DIR=$DIRECTORIO_INSTALACION/SFML/include -D SFML_DIR=$DIRECTORIO_INSTALACION/SFML/lib/cmake/SFML -D TGUI_BUILD_DOC:BOOL=ON -D TGUI_BUILD_EXAMPLES:BOOL=ON -D TGUI_BUILD_TESTS:BOOL=OFF -D TGUI_BUILD_GUI_BUILDER:BOOL=ON -D DOXYGEN_EXECUTABLE=$ARCHIVO_DOXYGEN ../..


and

cmake -G 'NMake Makefiles' -D CMAKE_BUILD_TYPE=Release -D CMAKE_MODULE_PATH=$DIRECTORIO_INSTALACION/SFML/cmake/Modules -D CMAKE_INSTALL_PREFIX=$DIRECTORIO_INSTALACION_LIBRERIA -D SFML_INCLUDE_DIR=$DIRECTORIO_INSTALACION/SFML/include -D SFML_DIR=$DIRECTORIO_INSTALACION/SFML/lib/cmake/SFML -D TGUI_BUILD_DOC:BOOL=ON -D TGUI_BUILD_EXAMPLES:BOOL=ON -D TGUI_BUILD_TESTS:BOOL=OFF -D TGUI_BUILD_GUI_BUILDER:BOOL=ON -D DOXYGEN_EXECUTABLE=$ARCHIVO_DOXYGEN ../..


and it works very well, but there are a new error in "installation"

[...]
-- Installing: W:/Archivos_de_Programa/MSVC2017/x64/TGUI/./themes/Black.png
-- Installing: W:/Archivos_de_Programa/MSVC2017/x64/TGUI/./themes/Black.txt
CMake Error at cmake_install.cmake:52 (file):
  file INSTALL cannot find
  "P:/Compilados/x32-x64/TRABAJO_MSVC2017_x64/TGUI/cmake/Modules/FindTGUI.cmake".




DJuego

P.S: By the way, when do you plan to release the new stable version 0.8? :-D

texus

This is a bug in my cmake script, the file no longer exists. The install command near the bottom of the CMakeLists.txt in the root dir should be removed. I'll do that tomorrow.

After SFML 2.5 is released, I'll release the new pre-alpha (which is basically Just the version you now already find on github). The alpha version should follow soon. Only then will I start looking at what to do in the beta version, so we are still far away from the final release.

DJuego

#4
Thank you again for your inmediate support, texus. (And thanks for answering my question)

This is my last script version. It works!

Quote[...] But for finding the latest SFML version it is recommended to just keep SFML_ROOT and CMAKE_MODULE_PATH empty and set the SFML_DIR to the SFML build directory (or the location where it was installed)

With "Debug mode" release

cmake -G 'NMake Makefiles' -D CMAKE_BUILD_TYPE=Debug -D CMAKE_INSTALL_PREFIX=$DIRECTORIO_INSTALACION_LIBRERIA -D SFML_DIR=$DIRECTORIO_INSTALACION/SFML/lib/cmake/SFML -D TGUI_BUILD_DOC:BOOL=ON -D TGUI_BUILD_EXAMPLES:BOOL=ON -D TGUI_BUILD_TESTS:BOOL=OFF -D TGUI_BUILD_GUI_BUILDER:BOOL=ON -D DOXYGEN_EXECUTABLE=$ARCHIVO_DOXYGEN ../..
[/code]

With "Release mode" release

cmake -G 'NMake Makefiles' -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=$DIRECTORIO_INSTALACION_LIBRERIA -D SFML_DIR=$DIRECTORIO_INSTALACION/SFML/lib/cmake/SFML -D TGUI_BUILD_DOC:BOOL=ON -D TGUI_BUILD_EXAMPLES:BOOL=ON -D TGUI_BUILD_TESTS:BOOL=OFF -D TGUI_BUILD_GUI_BUILDER:BOOL=ON -D DOXYGEN_EXECUTABLE=$ARCHIVO_DOXYGEN ../..