summaryrefslogtreecommitdiffstats
path: root/js/rust/CMakeLists.txt
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 14:29:10 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 14:29:10 +0000
commit2aa4a82499d4becd2284cdb482213d541b8804dd (patch)
treeb80bf8bf13c3766139fbacc530efd0dd9d54394c /js/rust/CMakeLists.txt
parentInitial commit. (diff)
downloadfirefox-2aa4a82499d4becd2284cdb482213d541b8804dd.tar.xz
firefox-2aa4a82499d4becd2284cdb482213d541b8804dd.zip
Adding upstream version 86.0.1.upstream/86.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'js/rust/CMakeLists.txt')
-rw-r--r--js/rust/CMakeLists.txt35
1 files changed, 35 insertions, 0 deletions
diff --git a/js/rust/CMakeLists.txt b/js/rust/CMakeLists.txt
new file mode 100644
index 0000000000..6032e59dc4
--- /dev/null
+++ b/js/rust/CMakeLists.txt
@@ -0,0 +1,35 @@
+project(rust-mozjs)
+cmake_minimum_required(VERSION 2.6)
+
+set(DUMMY ${CMAKE_BUILD_TYPE})
+
+set(SOURCES
+ src/jsglue.cpp
+ )
+
+include_directories($ENV{DEP_MOZJS_OUTDIR}/dist/include)
+
+if(MSVC)
+ if(NOT "$ENV{CARGO_FEATURE_DEBUGMOZJS}" STREQUAL "")
+ add_definitions(-MDd -Od -DDEBUG -D_DEBUG)
+ else()
+ add_definitions(-MD)
+ endif()
+ add_definitions(-FI$ENV{DEP_MOZJS_OUTDIR}/js/src/js-confdefs.h)
+ add_definitions(-DWIN32)
+ add_definitions(-Zi -GR-)
+else()
+ if(NOT "$ENV{CARGO_FEATURE_DEBUGMOZJS}" STREQUAL "")
+ add_definitions(-g -O0 -DDEBUG -D_DEBUG)
+ endif()
+ if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
+ add_definitions(-Wno-c++0x-extensions -Wno-invalid-offsetof)
+ endif()
+ add_definitions(-fPIC -fno-rtti)
+ add_definitions(-std=gnu++17)
+ add_definitions(-include $ENV{DEP_MOZJS_OUTDIR}/js/src/js-confdefs.h)
+endif()
+
+add_library(jsglue STATIC ${SOURCES})
+install(TARGETS jsglue ARCHIVE DESTINATION lib)
+