зеркало из https://github.com/microsoft/vcpkg.git
Adding WREN to vcpkg (#7242)
* First pass wren port * Add warnings defs, dont specifically use static * Revert warnings * See if bringing back new lines fixes windows build issues * Try force static * Remove STATIC * Force static
This commit is contained in:
Родитель
b6bc3f306c
Коммит
1e7303d4c5
|
@ -0,0 +1,50 @@
|
|||
# CMake taken from https://github.com/walterschell/wren/blob/cmake/CMakeLists.txt
|
||||
|
||||
# Need transitive dependencies introduced in 2.8.12
|
||||
cmake_minimum_required(VERSION 2.8.12)
|
||||
|
||||
project(Wren LANGUAGES "C")
|
||||
|
||||
set(wren_warning_flags "-Wall" "-Wextra" "-Werror" "-Wno-unused-parameter")
|
||||
|
||||
IF (WIN32)
|
||||
ADD_DEFINITIONS (-D_CRT_SECURE_NO_WARNINGS )
|
||||
ENDIF ()
|
||||
|
||||
set(opt_DIR "src/optional")
|
||||
set(vm_DIR "src/vm")
|
||||
|
||||
# TODO: Don't glob
|
||||
file(GLOB opt_SRCS ${opt_DIR}/*.c)
|
||||
file(GLOB vm_SRCS ${vm_DIR}/*.c)
|
||||
|
||||
set(wren_SRCS ${vm_SRCS} ${opt_SRCS})
|
||||
|
||||
add_library(wren ${wren_SRCS})
|
||||
|
||||
target_include_directories(wren PUBLIC src/include PRIVATE src/vm src/optional)
|
||||
|
||||
target_link_libraries(wren INTERFACE m)
|
||||
|
||||
target_compile_options(wren PRIVATE "-Wall")
|
||||
|
||||
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||
target_compile_options(wren PUBLIC -DDEBUG)
|
||||
endif()
|
||||
|
||||
|
||||
INSTALL (TARGETS wren
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib
|
||||
)
|
||||
|
||||
|
||||
IF (NOT DEFINED SKIP_INSTALL_HEADERS)
|
||||
INSTALL(
|
||||
FILES
|
||||
src/include/wren.h
|
||||
src/include/wren.hpp
|
||||
DESTINATION include
|
||||
)
|
||||
ENDIF ()
|
|
@ -0,0 +1,4 @@
|
|||
Source: wren
|
||||
Version: 2019-07-01
|
||||
Homepage: https://github.com/wren-lang/wren
|
||||
Description: Wren is a small, fast, class-based concurrent scripting language.
|
|
@ -0,0 +1,27 @@
|
|||
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO wren-lang/wren
|
||||
REF d1a0d0682ac072fa20f2dcca356dac06565e93a1
|
||||
SHA512 d6b7555da10ea209d04308467563ec401f699a22ca8524e4ae65fd050b0403c5e70430047dbb6a883b8021ab50525c17bb63d76543e7c59dfe4b521cfde6c413
|
||||
HEAD_REF master
|
||||
)
|
||||
|
||||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
OPTIONS
|
||||
-DCOMPILE_AS_CPP=OFF
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
|
||||
# Handle copyright
|
||||
configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY)
|
||||
|
||||
vcpkg_copy_pdbs()
|
Загрузка…
Ссылка в новой задаче