Skip to content

Commit b27a2a0

Browse files
committed
Merge pull request #1750 from pguyot/w28/improve-include-search-path
Improve include search path when compiling Erlang code These changes are made under both the "Apache 2.0" and the "GNU Lesser General Public License 2.1 or later" license terms (dual license). SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later
2 parents 67f0d3f + f2429bd commit b27a2a0

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

CMakeModules/BuildErlang.cmake

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,13 @@ macro(pack_archive avm_name)
2626
foreach(module_name IN LISTS ${PACK_ARCHIVE_MODULES} PACK_ARCHIVE_MODULES PACK_ARCHIVE_UNPARSED_ARGUMENTS)
2727
add_custom_command(
2828
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/beams/${module_name}.beam
29-
COMMAND mkdir -p ${CMAKE_CURRENT_BINARY_DIR}/beams && erlc +debug_info ${PACK_ARCHIVE_ERLC_FLAGS} -o ${CMAKE_CURRENT_BINARY_DIR}/beams -I ${CMAKE_SOURCE_DIR}/libs/include ${CMAKE_CURRENT_SOURCE_DIR}/${module_name}.erl
29+
COMMAND mkdir -p ${CMAKE_CURRENT_BINARY_DIR}/beams
30+
&& erlc +debug_info ${PACK_ARCHIVE_ERLC_FLAGS}
31+
-o ${CMAKE_CURRENT_BINARY_DIR}/beams
32+
-I ${CMAKE_SOURCE_DIR}/libs/include
33+
-I ${CMAKE_SOURCE_DIR}/libs
34+
-I ${CMAKE_CURRENT_SOURCE_DIR}/../include
35+
${CMAKE_CURRENT_SOURCE_DIR}/${module_name}.erl
3036
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${module_name}.erl
3137
COMMENT "Compiling ${module_name}.erl"
3238
VERBATIM

0 commit comments

Comments
 (0)