Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,15 @@ project (Jerry C ASM)
set(INCLUDE_LIBC_INTERFACE ${EXTERNAL_LIBC_INTERFACE})
endif()


# Should we use external jerry-port.c?
if(DEFINED EXTERNAL_PORT_FILE AND NOT EXTERNAL_PORT_FILE STREQUAL "UNDEFINED")
set(SOURCE_PORT_IMPLEMENTATION ${EXTERNAL_PORT_FILE})
set(USE_DEFAULT_PORT FALSE)
else()
set(USE_DEFAULT_PORT TRUE)
endif()

# Are there any interfaces for external libraries, other than libc, that should be registered?
if(DEFINED EXTERNAL_LIBS_INTERFACE AND NOT EXTERNAL_LIBS_INTERFACE STREQUAL "UNDEFINED")
set(INCLUDE_EXTERNAL_LIBS_INTERFACE )
Expand Down
13 changes: 12 additions & 1 deletion jerry-core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,13 @@ project (JerryCore C ASM)
${SOURCE_CORE_PARSER_REGEXP}
${SOURCE_CORE_JRT})

# Jerry port
if(USE_DEFAULT_PORT)
file(GLOB SOURCE_PORT_FILES ${CMAKE_SOURCE_DIR}/targets/default/*.c)
else()
set(SOURCE_PORT_FILES ${SOURCE_PORT_IMPLEMENTATION})
endif()

# All-in-one build
if("${ENABLE_ALL_IN_ONE}" STREQUAL "ON")
set(ALL_IN_FILE "${CMAKE_BINARY_DIR}/jerry-all-in.c")
Expand All @@ -157,9 +164,13 @@ project (JerryCore C ASM)
file(APPEND ${ALL_IN_FILE} "#include \"${FILE}\"\n")
endforeach()

foreach(FILE ${SOURCE_PORT_FILES})
file(APPEND ${ALL_IN_FILE} "#include \"${FILE}\"\n")
endforeach()

set(SOURCE_CORE ${ALL_IN_FILE})
else()
set(SOURCE_CORE ${SOURCE_CORE_FILES})
set(SOURCE_CORE ${SOURCE_CORE_FILES} ${SOURCE_PORT_FILES})
endif()

# Per-option configuration
Expand Down
File renamed without changes.