mirror of
https://git.planet-casio.com/Vhex-Kernel-Core/fxlibc.git
synced 2024-12-28 04:23:38 +01:00
add shared lib generation support for Vhex
This commit is contained in:
parent
c85182d07e
commit
7eb2a6e8ab
1 changed files with 30 additions and 9 deletions
|
@ -261,22 +261,43 @@ if(gint IN_LIST TARGET_FOLDERS)
|
||||||
src/time/target/gint/time.c)
|
src/time/target/gint/time.c)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# TODO: All targets
|
|
||||||
|
|
||||||
add_library(fxlibc ${SOURCES})
|
|
||||||
|
|
||||||
target_include_directories(fxlibc PRIVATE include/)
|
|
||||||
|
|
||||||
foreach(FOLDER IN LISTS TARGET_FOLDERS)
|
#---
|
||||||
target_include_directories(fxlibc PRIVATE include/target/${FOLDER}/)
|
# Handle "target-specific" fxlibc output format
|
||||||
|
#---
|
||||||
|
|
||||||
|
if(FXLIBC_TARGET STREQUAL vhex-sh)
|
||||||
|
set_property(GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS TRUE)
|
||||||
|
add_library(fxlibcStatic STATIC ${SOURCES})
|
||||||
|
add_library(fxlibcShared SHARED ${SOURCES})
|
||||||
|
set(FXLIBC_TARGET_LIBS "fxlibcStatic;fxlibcShared")
|
||||||
|
else()
|
||||||
|
add_library(fxlibcStatic STATIC ${SOURCES})
|
||||||
|
set(FXLIBC_TARGET_LIBS "fxlibcStatic")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
|
||||||
|
foreach(FXLIBC_LIB IN LISTS FXLIBC_TARGET_LIBS)
|
||||||
|
|
||||||
|
target_include_directories(${FXLIBC_LIB} PRIVATE include/)
|
||||||
|
foreach(FOLDER IN LISTS TARGET_FOLDERS)
|
||||||
|
target_include_directories(${FXLIBC_LIB} PRIVATE include/target/${FOLDER}/)
|
||||||
|
endforeach()
|
||||||
|
|
||||||
|
set_target_properties(${FXLIBC_LIB} PROPERTIES OUTPUT_NAME "c")
|
||||||
|
|
||||||
|
install(TARGETS ${FXLIBC_LIB} DESTINATION ${LIBDIR})
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
set_target_properties(fxlibc PROPERTIES
|
|
||||||
OUTPUT_NAME "c") # libc.a
|
|
||||||
|
|
||||||
# Install
|
|
||||||
|
|
||||||
install(TARGETS fxlibc DESTINATION ${LIBDIR})
|
|
||||||
|
#---
|
||||||
|
# Do not forget to install headers
|
||||||
|
#---
|
||||||
|
|
||||||
install(DIRECTORY include/ DESTINATION ${INCDIR} PATTERN "target" EXCLUDE)
|
install(DIRECTORY include/ DESTINATION ${INCDIR} PATTERN "target" EXCLUDE)
|
||||||
|
|
||||||
foreach(FOLDER IN LISTS TARGET_FOLDERS)
|
foreach(FOLDER IN LISTS TARGET_FOLDERS)
|
||||||
|
|
Loading…
Reference in a new issue