Skip to content

Commit

Permalink
add nuget version 2.8.6
Browse files Browse the repository at this point in the history
issue #201
  • Loading branch information
Scott M Anderson committed Jul 12, 2018
1 parent 35efc82 commit 23fae80
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 0 deletions.
1 change: 1 addition & 0 deletions projects/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
|[LLVM](http://llvm.org/ 'LLVM website')|[open](http://llvm.org/svn/llvm-project/llvm/trunk/LICENSE.TXT 'LLVM Release License')|The LLVM Compiler Infrastructure|3.9.0|[repo](https://github.com/llvm-mirror/llvm 'llvm repo on github')|none|
|[Lua](http://www.lua.org/ 'Lua website')|[open](http://www.lua.org/license.html 'MIT license')|a powerful, fast, lightweight, embeddable scripting language|5.2.3|[repo](https://github.com/smanders/lua 'forked lua repo on github')|[diff](https://github.com/smanders/lua/compare/LuaDist:5.2.3...xp5.2.3 'patch/diff')|
|[Node.js](http://nodejs.org 'Node.js website')|[open](https://raw.githubusercontent.com/nodejs/node/v8.11.0/LICENSE 'MIT license')|platform to build scalable network applications|8.11.0|[repo](https://github.com/nodejs/node 'node repo on github')|none|
|[NuGet](https://www.nuget.org 'NuGet website')|[MIT](https://docs.microsoft.com/en-us/nuget/policies/nuget-faq#nuget-command-line 'MIT')|pre-built (MSW) the package manager for .NET|2.8.6|[repo](https://github.com/NuGet 'NuGet on github')|none|
|[OpenH264](http://www.openh264.org/ 'OpenH264 website')|[open](http://www.openh264.org/faq.html 'Two-Clause BSD license')|a codec library which supports H.264 encoding and decoding|1.4.0|[repo](https://github.com/cisco/openh264 'openh264 repo on github')|[diff](https://github.com/smanders/openh264/compare/cisco:v1.4.0...xp1.4.0 'patch/diff')|
|[OpenSSL](http://www.openssl.org/ 'OpenSSL website')|[open](http://www.openssl.org/source/license.html 'OpenSSL, SSLeay License: BSD-style')|Cryptography and SSL/TLS Toolkit|1.0.2a|[repo](https://github.com/smanders/openssl 'forked openssl repo on github')|[diff](https://github.com/smanders/openssl/compare/openssl:OpenSSL_1_0_2a...xp_1_0_2a 'patch/diff')|
|[patch](http://www.gnu.org/software/patch 'GNU patch website')|[GPL](http://www.gnu.org/licenses/gpl.html 'GNU GPL v3')|pre-built (MSW), built here (non-MSW) used internally to apply a patch file of differences|2.5.9-7/2.7.5|[repo](http://git.savannah.gnu.org/cgit/patch.git 'patch (git) repo on gnu.org')|none|
Expand Down
45 changes: 45 additions & 0 deletions projects/nuget.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# nuget
xpProOption(nuget)
set(VER 2.8.6)
set(PRO_NUGET
NAME nuget
WEB "NuGet" https://www.nuget.org "NuGet website"
LICENSE "MIT" "https://docs.microsoft.com/en-us/nuget/policies/nuget-faq#nuget-command-line" "MIT"
DESC "pre-built (MSW) the package manager for .NET"
REPO "repo" https://github.com/NuGet "NuGet on github"
VER ${VER}
DLURL https://dist.nuget.org/win-x86-commandline/v${VER}/nuget.exe
DLMD5 ef16c016d7eb396c8f65888a53b69d78
)
########################################
function(build_nuget)
if(NOT (XP_DEFAULT OR XP_PRO_NUGET))
return()
endif()
if(NOT MSVC)
return()
endif()
xpDownloadProject(${PRO_NUGET}) # download_${fn} target
xpGetArgValue(${PRO_NUGET} ARG DLURL VALUE dwnldUrl)
get_filename_component(fn ${dwnldUrl} NAME)
set(tgtDep download_${fn})
if(DEFINED XP_NUGET_COMPLETE_PKG)
xpGetArgValue(${PRO_NUGET} ARG VER VALUE VER)
configure_file(${PRO_DIR}/use/usexp-nuget-config.cmake ${STAGE_DIR}/share/cmake/
@ONLY NEWLINE_STYLE LF
)
ExternalProject_Add(nuget_bld DEPENDS ${tgtDep}
DOWNLOAD_COMMAND "" DOWNLOAD_DIR ${NULL_DIR} CONFIGURE_COMMAND ""
SOURCE_DIR ${NULL_DIR} BINARY_DIR ${NULL_DIR} INSTALL_DIR ${NULL_DIR}
BUILD_COMMAND ${CMAKE_COMMAND} -E copy_if_different ${DWNLD_DIR}/${fn} ${STAGE_DIR}/bin/${fn}
INSTALL_COMMAND ""
)
set_property(TARGET nuget_bld PROPERTY FOLDER ${bld_folder})
set(tgtDep nuget_bld)
endif()
message(STATUS "target ${tgtDep}")
if(ARGN)
set(${ARGN} ${tgtDep} PARENT_SCOPE)
set(NUGET_EXE ${DWNLD_DIR}/${fn} PARENT_SCOPE)
endif()
endfunction()
15 changes: 15 additions & 0 deletions projects/use/usexp-nuget-config.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# NUGET_FOUND - nuget was found
# NUGET_VER - nuget version
# NUGET_EXE - the nuget executable (MSVC on Windows only)
# this file (-config) installed to share/cmake
get_filename_component(XP_ROOTDIR ${CMAKE_CURRENT_LIST_DIR}/../.. ABSOLUTE)
get_filename_component(XP_ROOTDIR ${XP_ROOTDIR} ABSOLUTE) # remove relative parts
set(NUGET_VER "@VER@ [@PROJECT_NAME@]")
set(reqVars NUGET_VER)
if(MSVC)
set(NUGET_EXE ${XP_ROOTDIR}/bin/nuget.exe)
list(APPEND reqVars NUGET_EXE)
endif()
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(nuget REQUIRED_VARS ${reqVars})
mark_as_advanced(${reqVars})

0 comments on commit 23fae80

Please sign in to comment.