Skip to content

find_package fails on a locally installed libtcod #191

Closed

Description

@HexDecimal

I received an error report for installing libtcod and using find_package.

-- Libtcod version: 2.2.2
--
CMake Error at /home/.../projects/game/libtcod/share/libtcod/libtcodConfig.cmake:37 (target_include_directories):
target_include_directories can not be used on an ALIAS target.
Call Stack (most recent call first):
CMakeLists.txt:25 (find_package)
 
 
-- Configuring incomplete, errors occurred!

Likely caused by this line which I blindly copied from a downstream AUR patch.

target_include_directories(libtcod::libtcod INTERFACE ${LIBTCOD_INCLUDE_DIR})

It's possible that include directories are exported rather than added to the config file.

I don't believe I have any regression tests which cover CMake's config export.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions