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

failed to find some targets when used as CMake subproject #259

Closed
scturtle opened this issue Jul 12, 2018 · 1 comment
Closed

failed to find some targets when used as CMake subproject #259

scturtle opened this issue Jul 12, 2018 · 1 comment

Comments

@scturtle
Copy link

CMakeLists.txt:

cmake_minimum_required(VERSION 3.10)

set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH}
  "${PROJECT_SOURCE_DIR}/magnum/modules")

add_subdirectory(corrade)
add_subdirectory(magnum)
find_package(Magnum REQUIRED COMPONENTS ObjImporter)

Command line:

cmake .. -DWITH_OBJIMPORTER=ON

Error:

CMake Error at /home/shc/code/repos/cmake-3.11.1/share/cmake-3.11/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
  Could NOT find Magnum (missing: ObjImporter)
Call Stack (most recent call first):
  /home/shc/code/repos/cmake-3.11.1/share/cmake-3.11/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
  magnum/modules/FindMagnum.cmake:916 (find_package_handle_standard_args)
  CMakeLists.txt:8 (find_package)

if ObjImporter is removed from find_package line, it can acturally be built and used with target name ObjImporter but not Magnum::ObjImporter.

@mosra mosra self-assigned this Jul 16, 2018
@mosra mosra added this to TODO in Project management via automation Jul 16, 2018
@mosra mosra added this to the 2018.0c milestone Jul 16, 2018
@mosra
Copy link
Owner

mosra commented Jul 16, 2018

Hi,

thanks for the very detailed report! 👍 Helped me a lot with tracking this one down.

Turns out it was due to a single, very embarrassing typo 😆 Should be fixed in e830892. Please complain if you find further problems ;)

@mosra mosra closed this as completed Jul 16, 2018
Project management automation moved this from TODO to Done Jul 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

2 participants