2019-02-27 02:34:15 +08:00
include ( vcpkg_common_functions )
2019-03-25 06:32:53 +08:00
if ( ${ VCPKG_TARGET_ARCHITECTURE } MATCHES x86 )
message ( FATAL_ERROR "This library doesn't support x86 arch. Please use x64 instead. If it is critical, create an issue at the repo: github.com/luncliff/coroutine" )
endif ( )
# changed to 1.4.1
set ( VERSION_1_4_COMMIT 8399236a4adf1cb49ef51133fb887027e3d77141 )
2019-02-27 02:34:15 +08:00
vcpkg_from_github (
O U T _ S O U R C E _ P A T H S O U R C E _ P A T H
R E P O l u n c l i f f / c o r o u t i n e
2019-03-09 06:22:11 +08:00
R E F $ { V E R S I O N _ 1 _ 4 _ C O M M I T }
2019-03-25 06:32:53 +08:00
S H A 5 1 2 3 5 a d f 0 a a 3 a 9 2 3 b 8 6 9 e 0 2 d 1 e 3 3 9 8 7 f 6 c 9 9 2 2 f 9 0 9 1 8 e 8 4 f e a f 5 a 4 1 e 4 6 3 3 4 b 7 5 5 5 d b 7 5 f 5 5 c 6 d d 7 9 7 f 7 4 1 1 2 0 1 0 e f 5 e 6 8 2 e e 6 f 5 f b f 5 8 b e 8 4 a f 8 8 a 8 f 8 f 0 8 4 f 3 d 6 d a c 0 5
2019-02-27 02:34:15 +08:00
H E A D _ R E F m a s t e r
)
# package: 'ms-gsl'
2019-03-25 06:32:53 +08:00
set ( GSL_INCLUDE_DIR ${ CURRENT_INSTALLED_DIR } /include
C A C H E P A T H " p a t h t o i n c l u d e C + + c o r e g u i d e l i n e s u p p o r t l i b r a r y " F O R C E )
message ( STATUS "Using ms-gsl at ${GSL_INCLUDE_DIR}" )
2019-02-27 02:34:15 +08:00
set ( DLL_LINKAGE false )
if ( ${ VCPKG_LIBRARY_LINKAGE } MATCHES dynamic )
message ( STATUS "Using DLL linkage" )
set ( DLL_LINKAGE true )
endif ( )
vcpkg_configure_cmake (
S O U R C E _ P A T H $ { S O U R C E _ P A T H }
P R E F E R _ N I N J A
O P T I O N S
2019-03-25 06:32:53 +08:00
- D G S L _ I N C L U D E _ D I R = $ { G S L _ I N C L U D E _ D I R }
2019-02-27 02:34:15 +08:00
- D T E S T _ D I S A B L E D = T r u e
- D B U I L D _ S H A R E D _ L I B S = $ { D L L _ L I N K A G E }
)
vcpkg_install_cmake ( )
file (
I N S T A L L $ { S O U R C E _ P A T H } / L I C E N S E
D E S T I N A T I O N $ { C U R R E N T _ P A C K A G E S _ D I R } / s h a r e / c o r o u t i n e
R E N A M E c o p y r i g h t
)
if ( WIN32 AND DLL_LINKAGE )
file ( INSTALL ${ CURRENT_PACKAGES_DIR } /debug/lib/coroutine.dll
D E S T I N A T I O N $ { C U R R E N T _ P A C K A G E S _ D I R } / d e b u g / b i n
)
file ( REMOVE ${ CURRENT_PACKAGES_DIR } /debug/lib/coroutine.dll )
file ( INSTALL ${ CURRENT_PACKAGES_DIR } /lib/coroutine.dll
D E S T I N A T I O N $ { C U R R E N T _ P A C K A G E S _ D I R } / b i n
)
file ( REMOVE ${ CURRENT_PACKAGES_DIR } /lib/coroutine.dll )
endif ( )
# removed duplicates in debug
file ( REMOVE_RECURSE ${ CURRENT_PACKAGES_DIR } /debug/include )
file ( REMOVE_RECURSE ${ CURRENT_PACKAGES_DIR } /debug/share )
# unset used variables
unset ( DLL_LINKAGE )