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

Linux C++ packages: IMPORTED_LOCATION not set for anything other than RelWithDebInfo #1027

Closed
ogoffart opened this issue Mar 9, 2022 · 2 comments
Labels
a:language-c++ C++ API, codegen, CMake build system (mS,mO) packaging Packaging and ease of downloading/obtaining Slint

Comments

@ogoffart
Copy link
Member

ogoffart commented Mar 9, 2022

Using the C++ binary packages or installed packages, and when not building with -DCMAKE_BUILD_TYPE=RelWithDebInfo,
we get this error:

-- The CXX compiler identification is GNU 11.2.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
CMake Error in CMakeLists.txt:
  IMPORTED_LOCATION not set for imported target "slint-cpp-shared"
  configuration "Debug".


-- Generating done
CMake Generate step failed.  Build files cannot be regenerated correctly.
@ogoffart ogoffart added packaging Packaging and ease of downloading/obtaining Slint a:language-c++ C++ API, codegen, CMake build system (mS,mO) labels Mar 9, 2022
@ogoffart
Copy link
Member Author

ogoffart commented Mar 9, 2022

The generated SlintConfig.cmake contains

set_target_properties(slint-cpp-shared PROPERTIES IMPORTED_LOCATION_RELWITHDEBINFO;${_IMPORT_PREFIX}/lib/libslint_cpp.so)

@hunger
Copy link
Member

hunger commented Mar 9, 2022

I am looking into this right now.

I think the proper CMake-way of making this work is "MAP_IMPORTED_CONFIG_", but I do not see that show up in the generated output :-(

hunger added a commit to hunger/slint that referenced this issue Mar 9, 2022
Fix the mapping between a projects CMAKE_BUILD_TYPE and the build type
of the imported Slint library.

Fixes slint-ui#1027
hunger added a commit to hunger/slint that referenced this issue Mar 9, 2022
Fix the mapping between a projects CMAKE_BUILD_TYPE and the build type
of the imported Slint library.

Fixes slint-ui#1027
n-raine pushed a commit to n-raine/slint that referenced this issue Mar 10, 2022
Fix the mapping between a projects CMAKE_BUILD_TYPE and the build type
of the imported Slint library.

Fixes slint-ui#1027
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:language-c++ C++ API, codegen, CMake build system (mS,mO) packaging Packaging and ease of downloading/obtaining Slint
Projects
None yet
Development

No branches or pull requests

2 participants