Unverified Commit 08b9be3c authored by RichardHaselgrove's avatar RichardHaselgrove Committed by GitHub

Merge pull request #4008 from AenBleidd/remove_custom_vcpkg_rappture_port

[VS2019] Remove custom vcpkg rappture port
parents e36f86de cb01a39c
cmake_minimum_required(VERSION 3.11)
cmake_policy(VERSION 3.11)
project (rappture)
set(SRC_RAPPTURE_CORE
src/core/RpDXWriterFStubs.c
src/core/RpLibraryFStubs.c
src/core/RpUnitsFStubs.c
src/core/RpUtilsFStubs.c
src/core/scew_extras.c
src/core/RpBindingsDict.cc
src/core/RpBuffer.cc
src/core/RpBufferCInterface.cc
src/core/RpDXWriter.cc
src/core/RpDXWriterFInterface.cc
src/core/RpEncode.cc
src/core/RpEntityRef.cc
src/core/RpFortranCommon.cc
src/core/RpLibrary.cc
src/core/RpLibraryCInterface.cc
src/core/RpLibraryFInterface.cc
src/core/RpOutcome.cc
src/core/RpOutcomeCInterface.cc
src/core/RpPtr.cc
src/core/RpResult.cc
src/core/RpUnits.cc
src/core/RpUnitsCInterface.cc
src/core/RpUnitsFInterface.cc
src/core/RpUnitsStd.cc
src/core/RpUtils.cc
src/core/RpUtilsCInterface.cc
src/core/RpUtilsFInterface.cc
src/core/b64/cdecode.c
src/core/b64/cencode.c
src/core/scew/attribute.c
src/core/scew/element.c
src/core/scew/error.c
src/core/scew/parser.c
# src/core/scew/scew_extras.c
src/core/scew/str.c
src/core/scew/tree.c
src/core/scew/writer.c
src/core/scew/xattribute.c
src/core/scew/xerror.c
src/core/scew/xhandler.c
src/core/scew/xparser.c
src/core/scew/xprint.c
)
set(HEADERS
src/core/rappture.h
src/core/RpBindingsDict.h
src/core/RpBuffer.h
src/core/RpBufferCHelper.h
src/core/RpBufferCInterface.h
src/core/RpDict.h
src/core/RpDXWriter.h
src/core/RpDXWriterFInterface.h
src/core/RpDXWriterFStubs.h
src/core/RpEncode.h
src/core/RpEntityRef.h
src/core/RpFortranCommon.h
src/core/RpLibrary.h
src/core/RpLibraryCInterface.h
src/core/RpLibraryFInterface.h
src/core/RpLibraryFStubs.h
src/core/RpOutcome.h
src/core/RpOutcomeCHelper.h
src/core/RpOutcomeCInterface.h
src/core/RpPtr.h
src/core/RpSimpleBuffer.h
src/core/RpUnits.h
src/core/RpUnitsCInterface.h
src/core/RpUnitsFInterface.h
src/core/RpUnitsFStubs.h
src/core/RpUnitsStd.h
src/core/RpUtils.h
src/core/RpUtilsCInterface.h
src/core/RpUtilsFInterface.h
src/core/RpUtilsFStubs.h
src/core/scew_extras.h
)
add_definitions("-DRAPPTURE_VERSION=1.9")
add_definitions("-DSVN_VERSION=6713")
add_definitions("-D_USE_MATH_DEFINES")
add_library(rappture ${SRC_RAPPTURE_CORE})
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src/core/)
find_package(expat CONFIG REQUIRED)
target_link_libraries(rappture PRIVATE expat::expat)
install(TARGETS rappture
RUNTIME DESTINATION bin
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
)
install(FILES ${HEADERS} DESTINATION include/rappture)
\ No newline at end of file
Source: rappture
Version: 1.9
Description: Rappture is a toolkit supporting Rapid application infrastructure, making it quick and easy to develop powerful scientific applications.
Build-Depends: expat
diff --git a/src/core/RpDXWriter.cc b/src/core/RpDXWriter.cc
index e4748b35..d835aa43 100644
--- a/src/core/RpDXWriter.cc
+++ b/src/core/RpDXWriter.cc
@@ -18,6 +18,7 @@
#include <cfloat>
#include <RpDXWriter.h>
#include <assert.h>
+#include <unistd.h>
using namespace Rappture;
DXWriter::DXWriter() :
diff --git a/src/core/scew/scew.h b/src/core/scew/scew.h
index 9741ed59..924a7aed 100644
--- a/src/core/scew/scew.h
+++ b/src/core/scew/scew.h
@@ -61,11 +61,11 @@
# define SCEW_LIB_D
# endif /* _DEBUG */
-# if defined(SCEW_LIB_U) || defined(SCEW_LIB_S) || defined(SCEW_LIB_D)
-# pragma comment( lib, "scew_" SCEW_LIB_U SCEW_LIB_S SCEW_LIB_D ".lib" )
-# else
-# pragma comment( lib, "scew.lib" )
-# endif
+// # if defined(SCEW_LIB_U) || defined(SCEW_LIB_S) || defined(SCEW_LIB_D)
+// # pragma comment( lib, "scew_" SCEW_LIB_U SCEW_LIB_S SCEW_LIB_D ".lib" )
+// # else
+// # pragma comment( lib, "scew.lib" )
+// # endif
#endif /* _WIN32 */
include(vcpkg_common_functions)
vcpkg_download_distfile(ARCHIVE
URLS "https://nanohub.org/app/site/downloads/rappture/rappture-src-20130903.tar.gz"
FILENAME "rappture-src-20130903.tar.gz"
SHA512 3b42569d056c5e80762eada3aff23d230d4ba8f6f0078de44d8571a713dde91e31e66fe3c37ceb66e934a1410b338fb481aeb5a29ef56b53da4ad2e8a2a2ae59
)
vcpkg_extract_source_archive_ex(
OUT_SOURCE_PATH SOURCE_PATH
ARCHIVE ${ARCHIVE}
PATCHES
"${CMAKE_CURRENT_LIST_DIR}/fixBuild.patch"
)
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
file(COPY ${CMAKE_CURRENT_LIST_DIR}/config.h DESTINATION ${SOURCE_PATH}/src/core/)
file(COPY ${CMAKE_CURRENT_LIST_DIR}/unistd.h DESTINATION ${SOURCE_PATH}/src/core/)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
)
vcpkg_install_cmake()
vcpkg_copy_pdbs()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(
INSTALL ${SOURCE_PATH}/license.terms
DESTINATION ${CURRENT_PACKAGES_DIR}/share/rappture
RENAME copyright
)
#ifndef _UNISTD_H_
#define _UNISTD_H_
#if defined(_MSC_VER)
#include <BaseTsd.h>
typedef SSIZE_T ssize_t;
#endif
#endif
......@@ -104,7 +104,7 @@
<Exec Command="bootstrap-vcpkg.bat" WorkingDirectory="$(VcpkgRootDir)" ConsoleToMSBuild="true" />
</Target>
<Target Name="Build3rdPartyLibraries" BeforeTargets="ClCompile" DependsOnTargets="InstallVcpkg" AfterTargets="InstallVcpkg">
<Exec Command="vcpkg.exe install openssl curl[core,openssl] freetype[core,bzip2,png] ftgl wxwidgets opencl rappture gtest --overlay-ports=../../vcpkg_ports/ports --overlay-triplets=../../vcpkg_ports/triplets/$(VcpkgTripletConfig) --triplet $(VcpkgTripletName)" WorkingDirectory="$(VcpkgRootDir)" ConsoleToMSBuild="true" />
<Exec Command="vcpkg.exe upgrade --no-dry-run --overlay-ports=../../vcpkg_ports/ports --overlay-triplets=../../vcpkg_ports/triplets/$(VcpkgTripletConfig) --triplet $(VcpkgTripletName)" WorkingDirectory="$(VcpkgRootDir)" ConsoleToMSBuild="true" />
<Exec Command="vcpkg.exe install openssl curl[core,openssl] freetype[core,bzip2,png] ftgl wxwidgets opencl rappture gtest --overlay-triplets=../../vcpkg_ports/triplets/$(VcpkgTripletConfig) --triplet $(VcpkgTripletName)" WorkingDirectory="$(VcpkgRootDir)" ConsoleToMSBuild="true" />
<Exec Command="vcpkg.exe upgrade --no-dry-run --overlay-triplets=../../vcpkg_ports/triplets/$(VcpkgTripletConfig) --triplet $(VcpkgTripletName)" WorkingDirectory="$(VcpkgRootDir)" ConsoleToMSBuild="true" />
</Target>
</Project>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment