mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-24 10:39:08 +08:00
[mujs] init
This commit is contained in:
parent
340ff984cb
commit
91518839b9
24
ports/mujs/CMakeLists.txt
Normal file
24
ports/mujs/CMakeLists.txt
Normal file
@ -0,0 +1,24 @@
|
||||
cmake_minimum_required(VERSION 3.9)
|
||||
project(mujs)
|
||||
|
||||
if(MSVC)
|
||||
add_compile_options(/W3 /wd4005 /wd4996 /wd4018 -D_CRT_SECURE_NO_WARNINGS)
|
||||
endif()
|
||||
|
||||
file(GLOB libmujs_sources js*.c utf*.c regexp.c)
|
||||
|
||||
include_directories(.)
|
||||
|
||||
|
||||
add_library(libmujs ${libmujs_sources})
|
||||
|
||||
install(
|
||||
TARGETS libmujs
|
||||
RUNTIME DESTINATION bin
|
||||
LIBRARY DESTINATION lib
|
||||
ARCHIVE DESTINATION lib
|
||||
)
|
||||
|
||||
if(NOT DISABLE_INSTALL_HEADERS)
|
||||
install(FILES mujs.h DESTINATION include)
|
||||
endif()
|
3
ports/mujs/CONTROL
Normal file
3
ports/mujs/CONTROL
Normal file
@ -0,0 +1,3 @@
|
||||
Source: mujs
|
||||
Version: 25821e6d74fab5fcc200fe5e818362e03e114428
|
||||
Description: An embeddable Javascript interpreter in C
|
27
ports/mujs/portfile.cmake
Normal file
27
ports/mujs/portfile.cmake
Normal file
@ -0,0 +1,27 @@
|
||||
include(vcpkg_common_functions)
|
||||
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
|
||||
message(WARNING "building static")
|
||||
set(VCPKG_LIBRARY_LINKAGE static)
|
||||
endif()
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO ccxvii/mujs
|
||||
REF 25821e6d74fab5fcc200fe5e818362e03e114428
|
||||
SHA512 8f4ae9151ce6b7ef4b1951d23f95167d16a2acb0eba4ee656ad56c92cd19af3e049c6903533d93caf0206f776374f3203b6a3f3e1748c4e720dc11ed8ac26342
|
||||
HEAD_REF master
|
||||
)
|
||||
|
||||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON -DDISABLE_INSTALL_TOOLS=ON
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/mujs RENAME copyright)
|
Loading…
Reference in New Issue
Block a user