mirror of
https://github.com/eclipse-threadx/levelx.git
synced 2026-09-14 04:06:00 +08:00
Release 6.1.7
This commit is contained in:
+32
-5
@@ -6,6 +6,8 @@ project(levelx
|
||||
LANGUAGES C ASM
|
||||
)
|
||||
|
||||
option(LX_STANDALONE_ENABLE "Enable LevelX in standalone mode" OFF)
|
||||
|
||||
if(NOT DEFINED THREADX_ARCH)
|
||||
message(FATAL_ERROR "Error: THREADX_ARCH not defined")
|
||||
endif()
|
||||
@@ -19,14 +21,38 @@ add_library(${PROJECT_NAME})
|
||||
add_library("azrtos::${PROJECT_NAME}" ALIAS ${PROJECT_NAME})
|
||||
|
||||
# Define any required dependencies between this library and others
|
||||
target_link_libraries(${PROJECT_NAME} PUBLIC
|
||||
"azrtos::threadx"
|
||||
"azrtos::filex"
|
||||
)
|
||||
if(NOT LX_STANDALONE_ENABLE)
|
||||
target_link_libraries(${PROJECT_NAME} PUBLIC
|
||||
"azrtos::threadx")
|
||||
endif()
|
||||
|
||||
# A place for generated/copied include files (no need to change)
|
||||
set(CUSTOM_INC_DIR ${CMAKE_CURRENT_BINARY_DIR}/custom_inc)
|
||||
|
||||
# Pick up the common stuff
|
||||
add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/common)
|
||||
|
||||
# Include the user's override file if required
|
||||
if (NOT LX_USER_FILE)
|
||||
message(STATUS "Using default lx_user.h file")
|
||||
set(LX_USER_FILE ${CMAKE_CURRENT_LIST_DIR}/common/inc/lx_user_sample.h)
|
||||
else()
|
||||
message(STATUS "Using custom lx_user.h file from ${LX_USER_FILE}")
|
||||
endif()
|
||||
configure_file(${LX_USER_FILE} ${CUSTOM_INC_DIR}/lx_user.h COPYONLY)
|
||||
target_include_directories(${PROJECT_NAME}
|
||||
PUBLIC
|
||||
${CUSTOM_INC_DIR}
|
||||
)
|
||||
|
||||
if(NOT LX_STANDALONE_ENABLE)
|
||||
target_compile_definitions(${PROJECT_NAME} PUBLIC "LX_INCLUDE_USER_DEFINE_FILE" )
|
||||
else()
|
||||
# Enable LevelX and FileX standalone support (No Azure RTOS support)
|
||||
set(FX_STANDALONE_ENABLE ON CACHE BOOL "Standalone enable")
|
||||
target_compile_definitions(${PROJECT_NAME} PUBLIC "LX_INCLUDE_USER_DEFINE_FILE" -DLX_STANDALONE_ENABLE -DFX_STANDALONE_ENABLE)
|
||||
endif()
|
||||
|
||||
# Enable a build target that produces a ZIP file of all sources
|
||||
set(CPACK_SOURCE_GENERATOR "ZIP")
|
||||
set(CPACK_SOURCE_IGNORE_FILES
|
||||
@@ -39,4 +65,5 @@ set(CPACK_SOURCE_IGNORE_FILES
|
||||
".*~$"
|
||||
)
|
||||
set(CPACK_VERBATIM_VARIABLES YES)
|
||||
include(CPack)
|
||||
include(CPack)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user