-
-
Notifications
You must be signed in to change notification settings - Fork 452
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
Remove system install interface "include" #817
Conversation
When using installed ftxui with cmake find_package, cmake is unable to configure ftxui::screen, and it complains about a path "/include" in its INTERFACE_INCLUDE_DIRECTORIES. Removing the SYSTEM INSTALL_INTERFACE from ftxui_set_options seems to fix the issue without causing any other problems in building and using the library.
This is the CMakeLists.txt in which I am using my debian package'd version of ftxui cmake_minimum_required (VERSION 3.11)
project(ftxui-starter LANGUAGES CXX VERSION 1.0.0)
find_package(ftxui 5 REQUIRED)
add_executable(ftxui-starter main.cpp)
target_link_libraries(ftxui-starter
PRIVATE ftxui::screen
PRIVATE ftxui::dom
PRIVATE ftxui::component # Not needed for this example.
) Where main.cpp is just one of your DOM example cpp files. |
Awesome! Thank you so much! That being said, I am not sure if this is the correct way to fix the issue.
target_include_directories(${library} SYSTEM
INTERFACE
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
) instead, like GLFW is using? |
I tried to day installing the debian package produced: cmake ..
sudo make package
sudo dpkg -i ftxui-5.0.0-Linux.deb Then start using it using this cmake: cmake_minimum_required (VERSION 3.11)
project(ftxui-starter LANGUAGES CXX VERSION 1.0.0)
find_package(ftxui 5 REQUIRED)
add_executable(ftxui-starter src/main.cpp)
target_link_libraries(ftxui-starter
PRIVATE ftxui::screen
PRIVATE ftxui::dom
PRIVATE ftxui::component # Not needed for this example.
) Everything was correctly working. @shriramters, could you please let me know how to reproduce your issue? |
Hi @ArthurSonzogni I have figured out what the issue was: However, it would find these same exact files if I build and install it with cmake. So I improperly understood the documentation and decided to install the cmake files to Sorry for the confusion caused due to this. I will try to fix the initial issue that I have with the .cmake files not being detected. |
Additional Context: # Compute the installation prefix relative to this file.
get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH)
# Use original install prefix when loaded through a
# cross-prefix symbolic link such as /lib -> /usr/lib.
get_filename_component(_realCurr "${_IMPORT_PREFIX}" REALPATH)
get_filename_component(_realOrig "/usr/lib/aarch64-linux-gnu/cmake/ftxui" REALPATH)
if(_realCurr STREQUAL _realOrig)
set(_IMPORT_PREFIX "/usr/lib/aarch64-linux-gnu/cmake/ftxui")
endif()
unset(_realOrig)
unset(_realCurr)
get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
if(_IMPORT_PREFIX STREQUAL "/")
set(_IMPORT_PREFIX "")
endif() |
BTW @ArthurSonzogni, Here is the listing It might take a few weeks/months until the FTP Team processes it 😅 (Check https://people.debian.org/~roehling/new_queue/) Until then I will try to figure out the cmake issue and fix it in a revision |
Awesome! |
I am currently packaging ftxui for debian. I am able to package it and also install it fine from Tag 5.0.0
When using installed ftxui with cmake's find_package, cmake is unable to configure ftxui::screen.
It complains about a path "/include" in its INTERFACE_INCLUDE_DIRECTORIES.
Removing the SYSTEM INSTALL_INTERFACE from ftxui_set_options seems to fix the issue without causing any other problems in building and using the library.
This is the error (running on debian sid):
Not sure if this is the correct way to solve this, but it doesn't seem to have any impact on the library's functioning itself.
Atleast from my preliminary analysis.