vcpkg/ports/sfml/CMakeLists.txt

36 lines
889 B
CMake
Raw Normal View History

2016-12-08 06:02:23 +08:00
cmake_minimum_required(VERSION 2.6)
project(SFML)
2018-04-27 18:15:17 +08:00
include_directories(include)
include_directories(src)
2016-12-08 06:02:23 +08:00
if(NOT BUILD_SHARED_LIBS)
add_definitions(-DSFML_STATIC)
endif()
add_definitions(-DUNICODE -D_UNICODE)
add_definitions(-D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS)
# import SFML's 'sfml_add_library' macro and find_package utils
set(VERSION_MAJOR 2)
2018-04-27 18:15:17 +08:00
include(cmake/Config.cmake)
2016-12-08 06:02:23 +08:00
set(SFML_GENERATE_PDB ON)
2018-04-27 18:15:17 +08:00
include(cmake/Macros.cmake)
2016-12-08 06:02:23 +08:00
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake/Modules/)
2018-04-27 18:15:17 +08:00
add_subdirectory(src/SFML/System)
add_subdirectory(src/SFML/Window)
add_subdirectory(src/SFML/Network)
add_subdirectory(src/SFML/Audio)
add_subdirectory(src/SFML/Graphics)
2016-12-08 06:02:23 +08:00
2018-04-27 18:15:17 +08:00
if(WIN32)
set(LIB_SUFFIX /manual-link)
add_subdirectory(src/SFML/Main)
unset(LIB_SUFFIX)
2016-12-08 06:02:23 +08:00
endif()
if(NOT DEFINED SFML_SKIP_HEADERS)
2018-04-27 18:15:17 +08:00
install(DIRECTORY include/ DESTINATION include)
2016-12-08 06:02:23 +08:00
endif()