2016-12-08 06:02:23 +08:00
include ( vcpkg_common_functions )
2017-09-24 00:19:29 +08:00
vcpkg_from_github ( OUT_SOURCE_PATH SOURCE_PATH
2018-04-27 18:15:17 +08:00
R E P O S F M L / S F M L
R E F 2 . 4 . 2
2017-09-24 00:19:29 +08:00
H E A D _ R E F m a s t e r
2018-04-27 18:15:17 +08:00
S H A 5 1 2 8 a c f d f 3 2 0 9 3 9 c 9 5 3 a 9 a 3 4 1 3 3 9 8 f 8 2 d 0 2 d 6 8 a 5 6 a 3 3 7 f 1 3 6 6 c 2 6 7 7 c 1 4 c e 0 3 2 b a a 8 b a 0 5 9 1 1 3 a c 3 c 9 1 b b 6 e 6 f c 2 2 e e f 1 1 9 3 6 9 a 2 6 5 b e 7 e f 6 8 9 4 5 2 6 e 6 a 9 7 a 0 1 f 3 7 e 1 9 7 2
)
2016-12-08 06:02:23 +08:00
file ( REMOVE_RECURSE ${ SOURCE_PATH } /extlibs )
file ( COPY ${ CMAKE_CURRENT_LIST_DIR } /CMakeLists.txt DESTINATION ${ SOURCE_PATH } )
2018-04-27 18:15:17 +08:00
if ( VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" )
message ( "SFML currently requires the following libraries from the system package manager:\n libudev\n libx11\n libxrandr\n opengl\n\nThese can be installed on Ubuntu systems via apt-get install libx11-dev libxrandr-dev libxi-dev libudev-dev mesa-common-dev" )
endif ( )
2016-12-08 06:02:23 +08:00
vcpkg_configure_cmake (
S O U R C E _ P A T H $ { S O U R C E _ P A T H }
2018-04-27 18:15:17 +08:00
O P T I O N S _ D E B U G
- D S F M L _ S K I P _ H E A D E R S = O N
)
2016-12-08 06:02:23 +08:00
vcpkg_install_cmake ( )
vcpkg_copy_pdbs ( )
# don't force users to define SFML_STATIC while using static library
if ( VCPKG_LIBRARY_LINKAGE STREQUAL static )
file ( APPEND ${ CURRENT_PACKAGES_DIR } /include/SFML/Config.hpp "#undef SFML_API_IMPORT\n#define SFML_API_IMPORT\n" )
endif ( )
# move sfml-main to manual link dir
2018-04-27 18:15:17 +08:00
if ( EXISTS ${ CURRENT_PACKAGES_DIR } /lib/sfml-main.lib )
file ( COPY ${ CURRENT_PACKAGES_DIR } /lib/sfml-main.lib DESTINATION ${ CURRENT_PACKAGES_DIR } /lib/manual-link )
file ( REMOVE ${ CURRENT_PACKAGES_DIR } /lib/sfml-main.lib )
file ( COPY ${ CURRENT_PACKAGES_DIR } /debug/lib/sfml-main-d.lib DESTINATION ${ CURRENT_PACKAGES_DIR } /debug/lib/manual-link )
file ( REMOVE ${ CURRENT_PACKAGES_DIR } /debug/lib/sfml-main-d.lib )
endif ( )
2016-12-08 06:02:23 +08:00
2017-09-24 00:19:29 +08:00
# At the time of writing, HEAD has license.md instead of license.txt
2018-04-27 18:15:17 +08:00
if ( VCPKG_HEAD_VERSION )
2017-09-24 00:19:29 +08:00
file ( INSTALL ${ SOURCE_PATH } /license.md DESTINATION ${ CURRENT_PACKAGES_DIR } /share/sfml RENAME copyright )
else ( )
file ( INSTALL ${ SOURCE_PATH } /license.txt DESTINATION ${ CURRENT_PACKAGES_DIR } /share/sfml RENAME copyright )
endif ( )