2020-11-04 15:23:25 +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 F a s t C G I - A r c h i v e s / f c g i 2
R E F f c 8 c 6 5 4 7 a e 3 8 f a f 9 9 2 6 2 0 5 a 2 3 0 7 5 c 4 7 f b d 4 3 7 0 c 8
S H A 5 1 2 7 f 2 7 b 1 0 6 0 f b e a f 0 d e 9 b 8 a 4 3 a a 4 f f 9 5 4 a 0 0 4 c 4 9 e 9 9 f 7 d 6 e a 1 1 1 1 9 a 4 3 8 f c f f e 5 7 5 f b 4 6 9 b a 0 6 2 6 2 e 7 1 a c 8 1 3 2 f 9 2 e 7 4 1 8 9 e 2 0 9 7 f d 0 4 9 5 9 5 a 6 a 6 1 d 4 d 5 a 5 b a c 2 7 3 3 f 7 a
H E A D _ R E F m a s t e r
)
if ( VCPKG_TARGET_IS_WINDOWS )
# Check build system first
find_program ( NMAKE nmake REQUIRED )
list ( APPEND NMAKE_OPTIONS_REL
C F G = r e l e a s e
)
list ( APPEND NMAKE_OPTIONS_DBG
C F G = d e b u g
)
2021-11-10 19:50:31 +01:00
file ( RENAME "${SOURCE_PATH}/include/fcgi_config_x86.h" "${SOURCE_PATH}/include/fcgi_config.h" )
2020-11-04 15:23:25 +08:00
vcpkg_build_nmake (
2021-11-10 19:50:31 +01:00
S O U R C E _ P A T H " $ { S O U R C E _ P A T H } "
2020-11-04 15:23:25 +08:00
P R O J E C T _ S U B P A T H l i b f c g i
P R O J E C T _ N A M E l i b f c g i . m a k
O P T I O N S _ R E L E A S E
" $ { N M A K E _ O P T I O N S _ R E L } "
O P T I O N S _ D E B U G
" $ { N M A K E _ O P T I O N S _ D B G } "
)
2021-11-10 19:50:31 +01:00
file ( INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/include" DESTINATION "${CURRENT_PACKAGES_DIR}/include" RENAME ${ PORT } )
file ( INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/libfcgi/Release/libfcgi.lib" DESTINATION "${CURRENT_PACKAGES_DIR}/lib" )
file ( INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/libfcgi/Debug/libfcgi.lib" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib" )
2020-11-04 15:23:25 +08:00
if ( NOT VCPKG_CRT_LINKAGE STREQUAL static )
2021-11-10 19:50:31 +01:00
file ( INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/libfcgi/Release/libfcgi.dll" DESTINATION "${CURRENT_PACKAGES_DIR}/bin" )
file ( INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/libfcgi/Debug/libfcgi.dll" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/bin" )
2020-11-04 15:23:25 +08:00
endif ( )
elseif ( VCPKG_TARGET_IS_LINUX OR VCPKG_TARGET_IS_OSX ) # Build in UNIX
# Check build system first
if ( VCPKG_TARGET_IS_OSX )
message ( "${PORT} currently requires the following library from the system package manager:\n gettext\n automake\n libtool\n\nIt can be installed with brew install gettext automake libtool" )
else ( )
message ( "${PORT} currently requires the following library from the system package manager:\n gettext\n automake\n libtool\n libtool-bin\n\nIt can be installed with apt-get install gettext automake libtool libtool-bin" )
endif ( )
vcpkg_configure_make (
2021-11-10 19:50:31 +01:00
S O U R C E _ P A T H " $ { S O U R C E _ P A T H } "
2020-11-04 15:23:25 +08:00
A U T O C O N F I G
C O P Y _ S O U R C E
)
vcpkg_install_make ( )
# switch ${PORT} into /${PORT}
2021-11-10 19:50:31 +01:00
file ( RENAME "${CURRENT_PACKAGES_DIR}/include" "${CURRENT_PACKAGES_DIR}/include2" )
file ( MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/include" )
file ( RENAME "${CURRENT_PACKAGES_DIR}/include2" "${CURRENT_PACKAGES_DIR}/include/${PORT}" )
2020-11-04 15:23:25 +08:00
file ( REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share" )
2021-11-10 19:50:31 +01:00
vcpkg_fixup_pkgconfig ( )
2020-11-04 15:23:25 +08:00
else ( ) # Other build system
vcpkg_fail_port_install ( ALWAYS )
endif ( )
# Handle copyright
2021-11-10 19:50:31 +01:00
file ( INSTALL "${SOURCE_PATH}/LICENSE.TERMS" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright )