Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lowercase Vorbis in SFMLConfigDependencies.cmake.in: set_property could not find TARGET Vorbis. #1636

Closed
n04y opened this issue Jan 22, 2020 · 2 comments

Comments

@n04y
Copy link
Contributor

n04y commented Jan 22, 2020

Subject of the issue

Commit 110fb75513301af5400df0b9c499510a90684dc6 Rename FindVorbis -> FindVORBIS, for consistency with exported variables (110fb75) caused an cmake error when trying to find and link SFML, or more specifically, sfml-audio using CMake.

CMake Error at C:/Dev/lib/cmake/SFML/SFMLConfigDependencies.cmake:38 (set_property):
  set_property could not find TARGET Vorbis.  Perhaps it has not yet been
  created.
Call Stack (most recent call first):
  C:/Dev/lib/cmake/SFML/SFMLConfigDependencies.cmake:74 (sfml_bind_dependency)
  C:/Dev/lib/cmake/SFML/SFMLConfig.cmake:117 (include)
  CMakeLists.txt:8 (find_package)

Your environment

  • Your OS / distro / window manager used
    Windows 10
  • Your version of SFML (2.5.0, git master, etc)
    git master
  • Your compiler and compiler version used
    Visual Studio 16 2019
  • Special compiler flags used
    None

Steps to reproduce

<project_root>/CMakeLists.txt:

cmake_minimum_required(VERSION 3.16.0)
project(sfml-issue-repro)
set(SFML_STATIC_LIBRARIES ON)
find_package(SFML 2.5.1 COMPONENTS graphics audio REQUIRED)
find_package(OpenGL REQUIRED)
add_library(sfml-issue-repro SHARED main.cpp)
target_include_directories(sfml-issue-repro PUBLIC ${CMAKE_SOURCE_DIR}/include)
target_link_libraries(sfml-issue-repro PUBLIC ${OPENGL_LIBRARIES} sfml-graphics sfml-audio)
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=<your_install_prefix> ..

Expected behavior

CMake configures the project, so that it can be built with cmake --build . or using the preferred compiler directly.

Actual behavior

CMake can not configure the project. The errormessages contain the text mentioned in the subject of the issue 4 times.

@Bromeon
Copy link
Member

Bromeon commented Jan 23, 2020

Thanks for the report! I can reproduce this when building Thor using CMake.

This slipped through CI, as there are no tests for a dependent project building SFML. Might be quite some effort to set up, but maybe we could start with something simple?

@eXpl0it3r eXpl0it3r added this to Discussion in SFML 2.6.0 via automation Jan 23, 2020
@eXpl0it3r eXpl0it3r added this to the 2.6 milestone Jan 23, 2020
@eXpl0it3r eXpl0it3r moved this from Discussion to Ready in SFML 2.6.0 Jan 23, 2020
@eXpl0it3r
Copy link
Member

Fixed with 1d20ede

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
SFML 2.6.0
  
Done
Development

No branches or pull requests

3 participants