Files
FTXUI/cmake
Arthur Sonzogni 412d8c14e4
Some checks failed
Build / Bazel, cl, windows-latest (push) Has been cancelled
Build / Bazel, clang++, macos-latest (push) Has been cancelled
Build / Bazel, clang++, ubuntu-latest (push) Has been cancelled
Build / Bazel, g++, macos-latest (push) Has been cancelled
Build / Bazel, g++, ubuntu-latest (push) Has been cancelled
Build / CMake, cl, windows-latest (push) Has been cancelled
Build / CMake, gcc, ubuntu-latest (push) Has been cancelled
Build / CMake, llvm, ubuntu-latest (push) Has been cancelled
Build / CMake, llvm, macos-latest (push) Has been cancelled
Build / Test modules (llvm, ubuntu-latest) (push) Has been cancelled
Documentation / documentation (push) Has been cancelled
Fix CMake 3.12 compatibility by adding required install destinations (#1127)
The `install(TARGETS ...)` command in `cmake/ftxui_install.cmake` was missing required destination specifications that became mandatory in CMake 3.12+. This caused build failures when users tried to install FTXUI with the minimum supported CMake version.

The issue occurred because the install command:

```cmake
install(
  TARGETS screen dom component
  EXPORT ftxui-targets
  )
```

Was missing explicit destination specifications for different artifact types. CMake 3.12+ requires these destinations to be explicitly declared.

This PR adds the required destination specifications:

```cmake
install(
  TARGETS screen dom component
  EXPORT ftxui-targets
  ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
  LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
  RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
  )
```

The fix ensures that:
- Static libraries (`.a` files) are installed to the archive destination
- Shared libraries are installed to the library destination
- Executables are installed to the runtime destination

All destinations use CMake's standard directory variables for proper cross-platform compatibility. The change is backward compatible and maintains the same installation behavior while satisfying CMake 3.12+ requirements.

Fixes #1118.
2025-09-30 18:38:55 +02:00
..
2025-08-16 18:40:50 +02:00