Add pico sdk define

This commit is contained in:
2025-10-18 08:53:47 +03:00
parent 6c3c763934
commit 4885623492
5 changed files with 41 additions and 29 deletions

View File

@@ -221,11 +221,18 @@ if (TESTS)
add_subdirectory(tests)
endif()
if(PIP_FREERTOS)
add_definitions(-DPIP_FREERTOS)
if(PIP_MICRO)
add_definitions(-DMICRO_PIP)
set(ICU OFF)
set(LOCAL ON)
endif()
if(PIP_FREERTOS)
add_definitions(-DPIP_FREERTOS)
endif()
if(DEFINED PICO_BOARD)
add_definitions(-DPICO_SDK)
message(STATUS "Building PIP for Pi Pico SDK ${PICO_SDK_VERSION_STRING}")
endif()
# Check Bessel functions
set(CMAKE_REQUIRED_INCLUDES math.h)
@@ -329,7 +336,7 @@ if ((NOT DEFINED SHSTKPROJECT) AND (DEFINED ANDROID_PLATFORM))
#message("${ANDROID_NDK}/sysroot/usr/include")
endif()
if(NOT PIP_FREERTOS)
if(NOT PIP_MICRO)
if(WIN32)
if(${C_COMPILER} STREQUAL "cl.exe")
else()
@@ -350,7 +357,7 @@ if(NOT PIP_FREERTOS)
endif()
endif()
set(PIP_LIBS)
if(PIP_FREERTOS)
if(PIP_MICRO)
set(PIP_LIBS ${LIBS_MAIN})
else()
foreach(LIB_ ${LIBS_MAIN})
@@ -364,11 +371,11 @@ if(WIN32)
endif()
else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
if(DEFINED ENV{QNX_HOST} OR PIP_FREERTOS)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ftemplate-depth-32")
endif()
endif()
set(CMAKE_C_FLAGS "${CMAKE_CXX_FLAGS}")
if(DEFINED ENV{QNX_HOST} OR PIP_MICRO)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ftemplate-depth-32")
endif()
set(PCRE2_BUILD_PCRE2_8 OFF)
set(PCRE2_BUILD_PCRE2_16 ON )
@@ -406,7 +413,7 @@ endif()
if (NOT CROSSTOOLS)
if (NOT PIP_FREERTOS)
if (NOT PIP_MICRO)
if (PIP_BUILD_CONSOLE)
pip_module(console "" "PIP console support" "" "" "")
@@ -624,7 +631,7 @@ string(REPLACE ";" "," PIP_EXPORTS_STR "${PIP_EXPORTS}")
target_compile_definitions(pip PRIVATE "PICODE_DEFINES=\"${PIP_EXPORTS_STR}\"")
if(NOT PIP_FREERTOS)
if(NOT PIP_MICRO)
# Auxiliary
if (NOT CROSSTOOLS)
@@ -701,7 +708,7 @@ if(NOT LOCAL)
install(TARGETS ${PIP_MODULES} DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)
endif()
else()
if(NOT PIP_FREERTOS)
if(NOT PIP_MICRO)
if(WIN32)
install(TARGETS ${PIP_MODULES} RUNTIME DESTINATION bin)
install(TARGETS ${PIP_MODULES} ARCHIVE DESTINATION lib)
@@ -729,7 +736,7 @@ endif()
#
# Build Documentation
#
if ((NOT PIP_FREERTOS) AND (NOT CROSSTOOLS))
if ((NOT PIP_MICRO) AND (NOT CROSSTOOLS))
include(PIPDocumentation)
find_package(Doxygen)
if(DOXYGEN_FOUND)
@@ -798,7 +805,7 @@ message(" Type : ${CMAKE_BUILD_TYPE}")
if (NOT LOCAL)
message(" Install: \"${CMAKE_INSTALL_PREFIX}\"")
else()
if(NOT PIP_FREERTOS)
if(NOT PIP_MICRO)
message(" Install: local \"bin\", \"lib\" and \"include\"")
endif()
endif()
@@ -831,7 +838,7 @@ message(" Utilites:")
foreach(_util ${PIP_UTILS_LIST})
message(" * ${_util}")
endforeach()
if(NOT PIP_FREERTOS)
if(NOT PIP_MICRO)
message("")
message(" Using libraries:")
foreach(LIB_ ${LIBS_STATUS})