-
Notifications
You must be signed in to change notification settings - Fork 0
/
sdccSrcCMakeLists.txt
36 lines (32 loc) · 2.13 KB
/
sdccSrcCMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
add_subdirectory(avr)
add_subdirectory(ds390)
add_subdirectory(hc08)
add_subdirectory(mcs51)
add_subdirectory(mos6502)
add_subdirectory(pdk)
add_subdirectory(pic14)
add_subdirectory(pic16)
add_subdirectory(stm8)
add_subdirectory(z80)
set (SDCC_TOP_DIR ${CMAKE_CURRENT_LIST_DIR})
set (SDCC_APP sdcc )
set (SDCC_APP_DEFS _CRT_SECURE_NO_WARNINGS _CRT_NONSTDC_NO_WARNINGS WIN32 _CONSOLE )
set (SDCC_APP_DEFS ${SDCC_APP_DEFS} OPT_DISABLE_PDK13 OPT_DISABLE_PDK14 OPT_DISABLE_PDK15 OPT_DISABLE_MOS6502 OPT_DISABLE_MOS65C02 )
set (SDCC_APP_INC_DIRS . .. ../support/util )
set (SDCC_APP_LIB_DIRS . .. ../support/util )
#file(GLOB REGRESSION_LIB_SRCS RELATIVE ${SDCC_TOP_DIR} ./regression/*.c* ./regression/*.h*)
file(GLOB UTIL_LIB_SRCS RELATIVE ${SDCC_TOP_DIR} ../support/util/*.c* ../support/util/*.h* )
#file(GLOB SDCC_LIB_SRCS RELATIVE ${SDCC_TOP_DIR} ../src/SDCCerr*.c* ../src/SDCChash*.c* ../src/SDCCset*.c* ../src/SDCC*.h* )
file(GLOB SDCC_APP_HDRS RELATIVE ${SDCC_TOP_DIR} ./*.h*)
file(GLOB SDCC_APP_SRCS RELATIVE ${SDCC_TOP_DIR} ./*.c*)
set ( SDCC_ALL_SRCS ${REGRESSION_LIB_SRCS} ${UTIL_LIB_SRCS} ${SDCC_LIB_SRCS} ${SDCC_APP_HDRS} ${SDCC_APP_SRCS})
list(REMOVE_ITEM SDCC_ALL_SRCS ../support/util/findme.c altlex.c)
message("[INFO] UTIL_LIB_SRCS ${UTIL_LIB_SRCS}")
message("[INFO] SDCC_ALL_SRCS ${SDCC_ALL_SRCS}")
set (dep_libs ds390 hc08 pic14 pic16 mcs51 stm8 z80 )
add_executable (${SDCC_APP} ${SDCC_APP_HDRS} ${SDCC_ALL_SRCS} )
target_compile_definitions(${SDCC_APP} PRIVATE ${SDCC_APP_DEFS} )
target_include_directories(${SDCC_APP} PRIVATE ${SDCC_APP_INC_DIRS}/ )
target_link_directories (${SDCC_APP} PRIVATE ${SDCC_APP_LIB_DIRS}/ )
target_link_libraries (${SDCC_APP} ${dep_libs} )
#target_link_options (${SDCC_APP} PRIVATE "/SUBSYSTEM:WINDOWS" "/ENTRY:wWinMainCRTStartup" "/SAFESEH:NO" )