mirror of
https://github.com/EQEmu/Server.git
synced 2026-03-04 00:02:24 +00:00
Some fixes for strawberry perl on msvc, added automatic portable perl linking on windows (experimental)
This commit is contained in:
parent
5ce71b7923
commit
34cb51c449
1
.gitignore
vendored
1
.gitignore
vendored
@ -27,6 +27,7 @@ install_manifest.txt
|
|||||||
log/
|
log/
|
||||||
logs/
|
logs/
|
||||||
vcpkg/
|
vcpkg/
|
||||||
|
perl/
|
||||||
|
|
||||||
.idea/*
|
.idea/*
|
||||||
*cbp
|
*cbp
|
||||||
@ -1,15 +1,21 @@
|
|||||||
OPTION(EQEMU_FETCH_MSVC_DEPENDENCIES "Automatically fetch vcpkg dependencies for MSCV" ON)
|
OPTION(EQEMU_FETCH_MSVC_DEPENDENCIES "Automatically fetch vcpkg dependencies for MSCV" ON)
|
||||||
|
OPTION(EQEMU_FETCH_MSVC_DEPENDENCIES_PERL "Automatically fetch perl dependencies for MSCV" ON)
|
||||||
|
|
||||||
MARK_AS_ADVANCED(EQEMU_FETCH_MSVC_DEPENDENCIES)
|
MARK_AS_ADVANCED(EQEMU_FETCH_MSVC_DEPENDENCIES)
|
||||||
|
MARK_AS_ADVANCED(EQEMU_FETCH_MSVC_DEPENDENCIES_PERL)
|
||||||
|
|
||||||
SET(EQEMU_MSVC_DEPENDENCIES_VCPKG_X86 "https://github.com/EQEmu/Server/releases/download/v1.2/vcpkg-export-x86.zip" CACHE STRING "The location that windows x86 dependencies will be pulled from.")
|
SET(EQEMU_MSVC_DEPENDENCIES_VCPKG_X86 "https://github.com/EQEmu/Server/releases/download/v1.2/vcpkg-export-x86.zip" CACHE STRING "The location that windows x86 dependencies will be pulled from.")
|
||||||
SET(EQEMU_MSVC_DEPENDENCIES_VCPKG_X64 "https://github.com/EQEmu/Server/releases/download/v1.2/vcpkg-export-x64.zip" CACHE STRING "The location that windows x64 dependencies will be pulled from.")
|
SET(EQEMU_MSVC_DEPENDENCIES_VCPKG_X64 "https://github.com/EQEmu/Server/releases/download/v1.2/vcpkg-export-x64.zip" CACHE STRING "The location that windows x64 dependencies will be pulled from.")
|
||||||
|
SET(EQEMU_MSVC_DEPENDENCIES_PERL_X86 "http://strawberryperl.com/download/5.30.0.1/strawberry-perl-5.30.0.1-32bit-portable.zip" CACHE STRING "The location that windows x86 perl dependencies will be pulled from.")
|
||||||
|
SET(EQEMU_MSVC_DEPENDENCIES_PERL_X64 "http://strawberryperl.com/download/5.30.0.1/strawberry-perl-5.30.0.1-64bit-portable.zip" CACHE STRING "The location that windows x64 perl dependencies will be pulled from.")
|
||||||
|
|
||||||
MARK_AS_ADVANCED(EQEMU_WINDOWS_DEPENDENCIES_X86)
|
MARK_AS_ADVANCED(EQEMU_WINDOWS_DEPENDENCIES_X86)
|
||||||
MARK_AS_ADVANCED(EQEMU_WINDOWS_DEPENDENCIES_X64)
|
MARK_AS_ADVANCED(EQEMU_WINDOWS_DEPENDENCIES_X64)
|
||||||
|
MARK_AS_ADVANCED(EQEMU_MSVC_DEPENDENCIES_PERL_X86)
|
||||||
|
MARK_AS_ADVANCED(EQEMU_MSVC_DEPENDENCIES_PERL_X64)
|
||||||
|
|
||||||
IF(EQEMU_FETCH_MSVC_DEPENDENCIES AND NOT DEFINED VCPKG_TARGET_TRIPLET)
|
IF(EQEMU_FETCH_MSVC_DEPENDENCIES AND NOT DEFINED VCPKG_TARGET_TRIPLET)
|
||||||
MESSAGE(STATUS "No existing vcpkg found for MSVC")
|
MESSAGE(STATUS "Downloading existing vcpkg dependencies from releases...")
|
||||||
MESSAGE(STATUS "Downloading existing dependencies from releases...")
|
|
||||||
|
|
||||||
IF(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
IF(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||||
SET(DEP_URL ${EQEMU_MSVC_DEPENDENCIES_VCPKG_X64})
|
SET(DEP_URL ${EQEMU_MSVC_DEPENDENCIES_VCPKG_X64})
|
||||||
@ -42,6 +48,36 @@ IF(EQEMU_FETCH_MSVC_DEPENDENCIES AND NOT DEFINED VCPKG_TARGET_TRIPLET)
|
|||||||
ELSE()
|
ELSE()
|
||||||
INCLUDE("${PROJECT_SOURCE_DIR}/vcpkg/vcpkg-export-20180828-145854/scripts/buildsystems/vcpkg.cmake")
|
INCLUDE("${PROJECT_SOURCE_DIR}/vcpkg/vcpkg-export-20180828-145854/scripts/buildsystems/vcpkg.cmake")
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
#TODO: Perl, will be more complicated
|
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
|
IF(EQEMU_FETCH_MSVC_DEPENDENCIES_PERL AND NOT DEFINED PERL_LIBRARY)
|
||||||
|
MESSAGE(STATUS "Downloading existing perl dependencies...")
|
||||||
|
|
||||||
|
IF(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||||
|
SET(DEP_URL ${EQEMU_MSVC_DEPENDENCIES_PERL_X64})
|
||||||
|
ELSE()
|
||||||
|
SET(DEP_URL ${EQEMU_MSVC_DEPENDENCIES_PERL_X86})
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E remove_directory ${PROJECT_SOURCE_DIR}/perl)
|
||||||
|
EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E make_directory ${PROJECT_SOURCE_DIR}/perl)
|
||||||
|
|
||||||
|
FILE(DOWNLOAD ${DEP_URL} ${PROJECT_SOURCE_DIR}/perl/perl.zip
|
||||||
|
SHOW_PROGRESS
|
||||||
|
STATUS DOWNLOAD_STATUS)
|
||||||
|
|
||||||
|
LIST(GET DOWNLOAD_STATUS 0 STATUS_CODE)
|
||||||
|
IF(NOT STATUS_CODE EQUAL 0)
|
||||||
|
MESSAGE(FATAL_ERROR "Was unable to download dependencies from ${DEP_URL}")
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
MESSAGE(STATUS "Extracting files")
|
||||||
|
EXECUTE_PROCESS(
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E tar xzf ${PROJECT_SOURCE_DIR}/perl/perl.zip
|
||||||
|
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/perl
|
||||||
|
)
|
||||||
|
|
||||||
|
SET(PERL_EXECUTABLE ${PROJECT_SOURCE_DIR}/perl/perl/bin/perl.exe)
|
||||||
|
SET(PERL_INCLUDE_PATH ${PROJECT_SOURCE_DIR}/perl/perl/lib/CORE)
|
||||||
|
SET(PERL_LIBRARY ${PROJECT_SOURCE_DIR}/perl/perl/lib/CORE/libperl530.a)
|
||||||
|
ENDIF()
|
||||||
@ -13,6 +13,10 @@
|
|||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
extern "C" { //the perl headers dont do this for us...
|
extern "C" { //the perl headers dont do this for us...
|
||||||
#endif
|
#endif
|
||||||
|
#if _MSC_VER
|
||||||
|
#define __inline__ __inline
|
||||||
|
#define __builtin_expect
|
||||||
|
#endif
|
||||||
#include <perl.h>
|
#include <perl.h>
|
||||||
#include <XSUB.h>
|
#include <XSUB.h>
|
||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
|
|||||||
@ -25,6 +25,10 @@ Eglin
|
|||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
extern "C" { //the perl headers dont do this for us...
|
extern "C" { //the perl headers dont do this for us...
|
||||||
#endif
|
#endif
|
||||||
|
#if _MSC_VER
|
||||||
|
#define __inline__ __inline
|
||||||
|
#define __builtin_expect
|
||||||
|
#endif
|
||||||
#include <perl.h>
|
#include <perl.h>
|
||||||
#include <XSUB.h>
|
#include <XSUB.h>
|
||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
|
|||||||
@ -8,6 +8,10 @@
|
|||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
extern "C" { //the perl headers dont do this for us...
|
extern "C" { //the perl headers dont do this for us...
|
||||||
#endif
|
#endif
|
||||||
|
#if _MSC_VER
|
||||||
|
#define __inline__ __inline
|
||||||
|
#define __builtin_expect
|
||||||
|
#endif
|
||||||
#include <perl.h>
|
#include <perl.h>
|
||||||
#include <XSUB.h>
|
#include <XSUB.h>
|
||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user