SFML/test/install/CMakeLists.txt
Chris Thrasher e4f81af337 Test install interface
Skip Android, iOS, and Framework builds simply because I can't get
them to work and don't want that holding up getting the rest of the
install tests merged.

Skip the Static DRM install test because there's a bug in the install
that needs to be fixed.
2022-10-15 09:07:49 +02:00

16 lines
683 B
CMake

cmake_minimum_required(VERSION 3.16)
project(test-sfml-install CXX)
# This skips the find_package call when building via add_subdirectory since that will fail under those circumstances
# It's a CMake 3.16-compatible replacement to PROJECT_IS_TOP_LEVEL
# https://cmake.org/cmake/help/latest/variable/PROJECT_IS_TOP_LEVEL.html
if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
if(NOT BUILD_SHARED_LIBS)
set(SFML_STATIC_LIBRARIES TRUE)
endif()
find_package(SFML 3.0.0 EXACT CONFIG REQUIRED COMPONENTS Graphics Network Audio)
endif()
add_executable(test-sfml-install Install.cpp)
target_link_libraries(test-sfml-install PRIVATE SFML::Graphics SFML::Network SFML::Audio)