mirror of
https://github.com/SFML/SFML.git
synced 2024-11-25 04:41:05 +08:00
65fef85b30
CMake doesn't require absolute paths so we can safely remove SRCROOT and let implicit relative pathing achieve the same result with less work on our part.
20 lines
632 B
CMake
20 lines
632 B
CMake
# all source files
|
|
set(SRC OpenGL.cpp)
|
|
|
|
if (SFML_OS_IOS)
|
|
set(RESOURCES
|
|
${CMAKE_CURRENT_SOURCE_DIR}/resources/background.jpg
|
|
${CMAKE_CURRENT_SOURCE_DIR}/resources/tuffy.ttf)
|
|
set_source_files_properties(${RESOURCES} PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
|
|
endif()
|
|
|
|
# define the opengl target
|
|
sfml_add_example(opengl GUI_APP
|
|
SOURCES ${SRC}
|
|
BUNDLE_RESOURCES ${RESOURCES}
|
|
DEPENDS SFML::Graphics
|
|
RESOURCES_DIR resources)
|
|
|
|
# external dependency headers
|
|
target_include_directories(opengl SYSTEM PRIVATE ${PROJECT_SOURCE_DIR}/examples/opengl)
|