🎉 Added angelscript
This commit is contained in:
parent
4333a5e730
commit
bc1fb66998
3
.gitignore
vendored
3
.gitignore
vendored
@ -1,2 +1,3 @@
|
|||||||
build/
|
build/
|
||||||
tmp/
|
tmp/
|
||||||
|
upload.sh
|
12
angelscript/all/conandata.yml
Normal file
12
angelscript/all/conandata.yml
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
sources:
|
||||||
|
"2.32.0":
|
||||||
|
url: "https://cdn.anotherfoxguy.com/angelscript_2.32.0.zip"
|
||||||
|
sha256: "b49d72f8ada622b7cb5b266e7cea5ab5c553ea7fe078877dcf6f6c03d487e518"
|
||||||
|
"2.33.0":
|
||||||
|
url: "https://cdn.anotherfoxguy.com/angelscript_2.33.0.zip"
|
||||||
|
sha256: "3691090b23d4382849a4f4e0ab71d94526636c64deec94a97d7d9419e2e21ea3"
|
||||||
|
|
||||||
|
patches:
|
||||||
|
"2.32.0":
|
||||||
|
- patch_file: "patches/add-install.patch"
|
||||||
|
"2.33.0": ""
|
27
angelscript/all/conanfile.py
Normal file
27
angelscript/all/conanfile.py
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
from conans import ConanFile, CMake, tools
|
||||||
|
|
||||||
|
|
||||||
|
class AngelscriptConan(ConanFile):
|
||||||
|
name = "angelscript"
|
||||||
|
license = "zlib"
|
||||||
|
url = "https://github.com/AnotherFoxGuy/angelscript/issues"
|
||||||
|
description = " AngelScript is an extremely flexible cross-platform scripting library designed to allow applications to extend their functionality through external scripts."
|
||||||
|
settings = "os", "compiler", "build_type", "arch"
|
||||||
|
exports_sources = "patches/**"
|
||||||
|
|
||||||
|
def source(self):
|
||||||
|
tools.get(**self.conan_data["sources"][self.version], strip_root=True)
|
||||||
|
for patch in self.conan_data["patches"][self.version]:
|
||||||
|
tools.patch(**patch)
|
||||||
|
|
||||||
|
def build(self):
|
||||||
|
cmake = CMake(self)
|
||||||
|
cmake.configure(source_folder="angelscript/projects/cmake")
|
||||||
|
cmake.build()
|
||||||
|
|
||||||
|
def package(self):
|
||||||
|
cmake = CMake(self)
|
||||||
|
cmake.install()
|
||||||
|
|
||||||
|
def package_info(self):
|
||||||
|
self.cpp_info.libs = tools.collect_libs(self)
|
81
angelscript/all/patches/add-install.patch
Normal file
81
angelscript/all/patches/add-install.patch
Normal file
@ -0,0 +1,81 @@
|
|||||||
|
--- angelscript/projects/cmake/CMakeLists.txt
|
||||||
|
+++ angelscript/projects/cmake/CMakeLists.txt
|
||||||
|
@@ -1,10 +1,9 @@
|
||||||
|
-cmake_minimum_required(VERSION 2.6)
|
||||||
|
-set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS TRUE)
|
||||||
|
-cmake_policy(SET CMP0003 NEW)
|
||||||
|
+cmake_minimum_required(VERSION 3.5)
|
||||||
|
|
||||||
|
project(angelscript)
|
||||||
|
|
||||||
|
option(BUILD_SHARED_LIBS "Build shared library" OFF)
|
||||||
|
+option(AS_NO_EXCEPTIONS "Disable exception handling in script context" OFF)
|
||||||
|
|
||||||
|
if(APPLE)
|
||||||
|
option(BUILD_FRAMEWORK "Build Framework bundle for OSX" OFF)
|
||||||
|
@@ -113,18 +112,8 @@
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
-include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../../include)
|
||||||
|
-
|
||||||
|
if(MSVC)
|
||||||
|
- set(CMAKE_DEBUG_POSTFIX "d")
|
||||||
|
- add_definitions(-D_CRT_SECURE_NO_WARNINGS)
|
||||||
|
-endif()
|
||||||
|
-
|
||||||
|
-add_definitions(-DANGELSCRIPT_EXPORT -D_LIB)
|
||||||
|
-
|
||||||
|
-# Fix x64 issues on Linux
|
||||||
|
-if("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "x86_64" AND NOT APPLE)
|
||||||
|
- add_definitions(-fPIC)
|
||||||
|
+ set(CMAKE_DEBUG_POSTFIX "d")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(NOT BUILD_FRAMEWORK)
|
||||||
|
@@ -136,9 +125,27 @@
|
||||||
|
set(ANGELSCRIPT_LIBRARY_NAME ${ANGELSCRIPT_LIBRARY_NAME} CACHE STRING "" FORCE)
|
||||||
|
|
||||||
|
add_library(${ANGELSCRIPT_LIBRARY_NAME} ${ANGELSCRIPT_SOURCE} ${ANGELSCRIPT_HEADERS})
|
||||||
|
+
|
||||||
|
+target_include_directories(${ANGELSCRIPT_LIBRARY_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../include)
|
||||||
|
+
|
||||||
|
+if(MSVC)
|
||||||
|
+ target_compile_definitions(${ANGELSCRIPT_LIBRARY_NAME} PRIVATE -D_CRT_SECURE_NO_WARNINGS)
|
||||||
|
+endif()
|
||||||
|
+
|
||||||
|
+target_compile_definitions(${ANGELSCRIPT_LIBRARY_NAME} PRIVATE -DANGELSCRIPT_EXPORT -D_LIB)
|
||||||
|
+
|
||||||
|
+if(AS_NO_EXCEPTIONS)
|
||||||
|
+ target_compile_definitions(${ANGELSCRIPT_LIBRARY_NAME} PRIVATE AS_NO_EXCEPTIONS)
|
||||||
|
+endif()
|
||||||
|
+
|
||||||
|
+# Fix x64 issues on Linux
|
||||||
|
+if("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "x86_64" AND UNIX AND NOT APPLE)
|
||||||
|
+ target_compile_options(${ANGELSCRIPT_LIBRARY_NAME} PRIVATE -fPIC)
|
||||||
|
+endif()
|
||||||
|
+
|
||||||
|
# Don't override the default library output path to avoid conflicts when building for multiple target platforms
|
||||||
|
#set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/../../lib)
|
||||||
|
-target_link_libraries(${ANGELSCRIPT_LIBRARY_NAME} ${CMAKE_THREAD_LIBS_INIT})
|
||||||
|
+target_link_libraries(${ANGELSCRIPT_LIBRARY_NAME} Threads::Threads)
|
||||||
|
|
||||||
|
set_target_properties(${ANGELSCRIPT_LIBRARY_NAME} PROPERTIES VERSION ${PROJECT_VERSION})
|
||||||
|
|
||||||
|
@@ -161,4 +168,16 @@
|
||||||
|
# Don't override the default runtime output path to avoid conflicts when building for multiple target platforms
|
||||||
|
#set(RUNTIME_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/../../bin)
|
||||||
|
|
||||||
|
+#See https://cmake.org/cmake/help/latest/manual/cmake-packages.7.html#creating-packages for a detailed explanation about this part
|
||||||
|
+install(TARGETS ${ANGELSCRIPT_LIBRARY_NAME} EXPORT AngelscriptTargets
|
||||||
|
+ RUNTIME DESTINATION bin
|
||||||
|
+ LIBRARY DESTINATION lib
|
||||||
|
+ ARCHIVE DESTINATION lib
|
||||||
|
+ INCLUDES DESTINATION include
|
||||||
|
+)
|
||||||
|
|
||||||
|
+install(FILES
|
||||||
|
+ ${CMAKE_CURRENT_SOURCE_DIR}/../../include/angelscript.h
|
||||||
|
+ DESTINATION include
|
||||||
|
+ COMPONENT Devel
|
||||||
|
+)
|
3
angelscript/config.yml
Normal file
3
angelscript/config.yml
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
versions:
|
||||||
|
"2.33.0":
|
||||||
|
folder: all
|
Loading…
x
Reference in New Issue
Block a user