Skip to content

Commit

Permalink
Update CMakeLists.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
OldFoolAgain committed Sep 2, 2023
1 parent a0c71cd commit bafd453
Showing 1 changed file with 83 additions and 82 deletions.
165 changes: 83 additions & 82 deletions spidermonkey/make/cmake/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,111 +1,112 @@
cmake_minimum_required(VERSION 3.18)
project(jscript VERSION 1.8.0 LANGUAGES C)

add_executable(jscpucfg ${PROJECT_SOURCE_DIR}/../../jscpucfg.c)
add_executable(jscpucfg ../../jscpucfg.c)

if(NOT WIN32)
target_compile_options( jscpucfg PRIVATE
-Wno-format-security
-Wno-deprecated-declarations
$<$<CONFIG:Release>:-Os>
)
# if(NOT EXISTS ${PROJECT_SOURCE_DIR}/../../jsautocfg.h)

#if(NOT EXISTS ${PROJECT_SOURCE_DIR}/jsautocfg.h)
add_custom_command(
OUTPUT ../../jsautocfg.h
COMMAND echo ${CMAKE_CURRENT_SOURCE_DIR} && ./jscpucfg > ${CMAKE_CURRENT_SOURCE_DIR}/../../jsautocfg.h && echo "Build complete"
DEPENDS ${PROJECT_SOURCE_DIR}/../../jsautocfg.h
DEPENDS jscpucfg
COMMENT "Generating jsautocfg.h"
)
# endif()
#endif()
endif(NOT WIN32)

add_library(jscript STATIC)

target_sources(jscript
PRIVATE
${PROJECT_SOURCE_DIR}/../../js.c
${PROJECT_SOURCE_DIR}/../../jsapi.c
${PROJECT_SOURCE_DIR}/../../jsarena.c
${PROJECT_SOURCE_DIR}/../../jsarray.c
${PROJECT_SOURCE_DIR}/../../jsatom.c
${PROJECT_SOURCE_DIR}/../../jsbool.c
${PROJECT_SOURCE_DIR}/../../jscntxt.c
${PROJECT_SOURCE_DIR}/../../jsdate.c
${PROJECT_SOURCE_DIR}/../../jsdbgapi.c
${PROJECT_SOURCE_DIR}/../../jsdhash.c
${PROJECT_SOURCE_DIR}/../../jsdtoa.c
${PROJECT_SOURCE_DIR}/../../jsemit.c
${PROJECT_SOURCE_DIR}/../../jsexn.c
${PROJECT_SOURCE_DIR}/../../jsfile.c
${PROJECT_SOURCE_DIR}/../../jsfun.c
${PROJECT_SOURCE_DIR}/../../jsgc.c
${PROJECT_SOURCE_DIR}/../../jshash.c
${PROJECT_SOURCE_DIR}/../../jsinterp.c
${PROJECT_SOURCE_DIR}/../../jsinvoke.c
${PROJECT_SOURCE_DIR}/../../jsiter.c
${PROJECT_SOURCE_DIR}/../../jslock.c
${PROJECT_SOURCE_DIR}/../../jslog2.c
${PROJECT_SOURCE_DIR}/../../jslong.c
${PROJECT_SOURCE_DIR}/../../jsmath.c
${PROJECT_SOURCE_DIR}/../../jsnum.c
${PROJECT_SOURCE_DIR}/../../jsobj.c
${PROJECT_SOURCE_DIR}/../../jsopcode.c
${PROJECT_SOURCE_DIR}/../../jsparse.c
${PROJECT_SOURCE_DIR}/../../jsprf.c
${PROJECT_SOURCE_DIR}/../../jsregexp.c
${PROJECT_SOURCE_DIR}/../../jsscan.c
${PROJECT_SOURCE_DIR}/../../jsscope.c
${PROJECT_SOURCE_DIR}/../../jsscript.c
${PROJECT_SOURCE_DIR}/../../jsstr.c
${PROJECT_SOURCE_DIR}/../../jsutil.c
${PROJECT_SOURCE_DIR}/../../jsxdrapi.c
${PROJECT_SOURCE_DIR}/../../jsxml.c
${PROJECT_SOURCE_DIR}/../../prmjtime.c
${PROJECT_SOURCE_DIR}/../../jsapi.h
${PROJECT_SOURCE_DIR}/../../jsarena.h
${PROJECT_SOURCE_DIR}/../../jsarray.h
${PROJECT_SOURCE_DIR}/../../jsatom.h
${PROJECT_SOURCE_DIR}/../../jsbool.h
${PROJECT_SOURCE_DIR}/../../jscntxt.h
${PROJECT_SOURCE_DIR}/../../jsdate.h
${PROJECT_SOURCE_DIR}/../../jsdbgapi.h
${PROJECT_SOURCE_DIR}/../../jsdhash.h
${PROJECT_SOURCE_DIR}/../../jsdtoa.h
${PROJECT_SOURCE_DIR}/../../jsemit.h
${PROJECT_SOURCE_DIR}/../../jsexn.h
${PROJECT_SOURCE_DIR}/../../jsfun.h
${PROJECT_SOURCE_DIR}/../../jsgc.h
${PROJECT_SOURCE_DIR}/../../jshash.h
${PROJECT_SOURCE_DIR}/../../jsinterp.h
${PROJECT_SOURCE_DIR}/../../jsiter.h
${PROJECT_SOURCE_DIR}/../../jslock.h
${PROJECT_SOURCE_DIR}/../../jslong.h
${PROJECT_SOURCE_DIR}/../../jsmath.h
${PROJECT_SOURCE_DIR}/../../jsnum.h
${PROJECT_SOURCE_DIR}/../../jsobj.h
${PROJECT_SOURCE_DIR}/../../jsopcode.h
${PROJECT_SOURCE_DIR}/../../jsparse.h
${PROJECT_SOURCE_DIR}/../../jsprf.h
${PROJECT_SOURCE_DIR}/../../jsprvtd.h
${PROJECT_SOURCE_DIR}/../../jspubtd.h
${PROJECT_SOURCE_DIR}/../../jsregexp.h
${PROJECT_SOURCE_DIR}/../../jsscan.h
${PROJECT_SOURCE_DIR}/../../jsscope.h
${PROJECT_SOURCE_DIR}/../../jsscript.h
${PROJECT_SOURCE_DIR}/../../jsstddef.h
${PROJECT_SOURCE_DIR}/../../jsstr.h
${PROJECT_SOURCE_DIR}/../../jstypes.h
${PROJECT_SOURCE_DIR}/../../jsutil.h
${PROJECT_SOURCE_DIR}/../../jsxdrapi.h
${PROJECT_SOURCE_DIR}/../../jsxml.h
${PROJECT_SOURCE_DIR}/../../prmjtime.h
${PROJECT_SOURCE_DIR}/../../jsopcode.tbl
../../js.c
../../jsapi.c
../../jsarena.c
../../jsarray.c
../../jsatom.c
../../jsbool.c
../../jscntxt.c
../../jsdate.c
../../jsdbgapi.c
../../jsdhash.c
../../jsdtoa.c
../../jsemit.c
../../jsexn.c
../../jsfile.c
../../jsfun.c
../../jsgc.c
../../jshash.c
../../jsinterp.c
../../jsinvoke.c
../../jsiter.c
../../jslock.c
../../jslog2.c
../../jslong.c
../../jsmath.c
../../jsnum.c
../../jsobj.c
../../jsopcode.c
../../jsparse.c
../../jsprf.c
../../jsregexp.c
../../jsscan.c
../../jsscope.c
../../jsscript.c
../../jsstr.c
../../jsutil.c
../../jsxdrapi.c
../../jsxml.c
../../prmjtime.c
../../jsapi.h
../../jsarena.h
../../jsarray.h
../../jsatom.h
../../jsbool.h
../../jscntxt.h
../../jsdate.h
../../jsdbgapi.h
../../jsdhash.h
../../jsdtoa.h
../../jsemit.h
../../jsexn.h
../../jsfun.h
../../jsgc.h
../../jshash.h
../../jsinterp.h
../../jsiter.h
../../jslock.h
../../jslong.h
../../jsmath.h
../../jsnum.h
../../jsobj.h
../../jsopcode.h
../../jsparse.h
../../jsprf.h
../../jsprvtd.h
../../jspubtd.h
../../jsregexp.h
../../jsscan.h
../../jsscope.h
../../jsscript.h
../../jsstddef.h
../../jsstr.h
../../jstypes.h
../../jsutil.h
../../jsxdrapi.h
../../jsxml.h
../../prmjtime.h
../../jsopcode.tbl
)

# We only want this files for Unix platforms
if( NOT WIN32 )
target_sources(jscript PRIVATE
${PROJECT_SOURCE_DIR}/../../jsautocfg.h
../../jsautocfg.h
)
endif()

Expand Down

0 comments on commit bafd453

Please sign in to comment.