Skip to content

Commit 55f2ab5

Browse files
committed
cmake: Program init starts can now be configured
1 parent 7ab0b81 commit 55f2ab5

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/apps/CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,15 @@ link(
6464
# ---------------------------------------------------------------------------
6565
# Program - INIT
6666
# ---------------------------------------------------------------------------
67+
set(MOS_INIT_PROGRAM \"MPDEMO.FLT\" CACHE STRING "Program which the init starts first.")
68+
set(MOS_INIT_PROGRAMS \"MPDEMO.FLT\" \"PROC1.FLT\" \"GUI0.FLT\")
69+
set_property(CACHE MOS_INIT_PROGRAM PROPERTY STRINGS ${MOS_INIT_PROGRAMS})
70+
6771
compile_lib(
6872
NAME init
6973
SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/init.c
7074
FLAGS ${MOS_USER_GCC_FLAGS}
71-
DEFINITIONS ${MOS_USER_GCC_DEFINITIONS}
75+
DEFINITIONS ${MOS_USER_GCC_DEFINITIONS} INIT_PROG=${MOS_INIT_PROGRAM}
7276
INCLUDE_DIRECTORIES ${MOS_USER_GCC_INCLUDE_DIRS}
7377
)
7478

src/apps/init.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ void proc_main()
2020
{
2121
cm_process_register_event_handler (OSIF_PROCESS_EVENT_PROCCESS_CHILD_KILLED, init_child_killed);
2222

23-
cm_process_create ("MPDEMO.FLT", false);
23+
cm_process_create (INIT_PROG, false);
24+
2425
while (1) {
2526
cm_process_handle_events();
2627
}

0 commit comments

Comments
 (0)