mirror of
https://github.com/SFML/SFML.git
synced 2024-11-25 04:41:05 +08:00
4586db91a9
This removes the sfml- prefixed targets from the export set. The sfml- prefixed targets are still available within the build tree but not to downstream users thus making this an API breaking change when compared to the 2.x releases. To keep things consistent, usage of the sfml- targets were replaced with their namespaced counterparts. This has a number of benefits: 1. It's more idiomatic. Modern CMake libraries are expected to have namespaced targets. 2. Namespaced targets are less likely to collide with user-defined targets. No one will accidentally define a SFML:: target. 3. If a namespaced target is not found by CMake, configuration will immediately stop.
13 lines
352 B
CMake
13 lines
352 B
CMake
|
|
set(SRCROOT ${PROJECT_SOURCE_DIR}/examples/X11)
|
|
|
|
# all source files
|
|
set(SRC ${SRCROOT}/X11.cpp)
|
|
|
|
# define the X11 target
|
|
sfml_add_example(X11Example GUI_APP
|
|
SOURCES ${SRC}
|
|
DEPENDS SFML::Window X11)
|
|
|
|
# external dependency headers
|
|
target_include_directories(X11Example SYSTEM PRIVATE ${PROJECT_SOURCE_DIR}/examples/X11) |