source: azure_iot_hub_f767zi/trunk/asp_baseplatform/lwip/contrib-2.1.0/ports/unix/lib/CMakeLists.txt@ 457

Last change on this file since 457 was 457, checked in by coas-nagasima, 4 years ago

ファイルを追加

  • Property svn:eol-style set to native
  • Property svn:mime-type set to text/plain;charset=UTF-8
File size: 1.2 KB
Line 
1cmake_minimum_required(VERSION 3.8)
2
3project(lwip C)
4
5set (BUILD_SHARED_LIBS ON)
6
7if (NOT CMAKE_SYSTEM_NAME STREQUAL Linux AND NOT CMAKE_SYSTEM_NAME STREQUAL GNU)
8 message(FATAL_ERROR "Lwip shared library is only working on Linux or the Hurd")
9endif()
10
11set(LWIP_CONTRIB_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../..)
12set(LWIP_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../../../lwip)
13
14include(${LWIP_CONTRIB_DIR}/ports/CMakeCommon.cmake)
15
16set (LWIP_DEFINITIONS -DLWIP_DEBUG)
17set (LWIP_INCLUDE_DIRS
18 "${LWIP_DIR}/src/include"
19 "${LWIP_CONTRIB_DIR}/"
20 "${LWIP_CONTRIB_DIR}/ports/unix/port/include"
21 "${CMAKE_CURRENT_SOURCE_DIR}/"
22)
23
24include(${LWIP_CONTRIB_DIR}/ports/unix/Filelists.cmake)
25include(${LWIP_DIR}/src/Filelists.cmake)
26
27add_library(lwip ${lwipnoapps_SRCS} ${lwipcontribportunix_SRCS} ${lwipcontribportunixnetifs_SRCS})
28target_compile_options(lwip PRIVATE ${LWIP_COMPILER_FLAGS})
29target_compile_definitions(lwip PRIVATE ${LWIP_DEFINITIONS} ${LWIP_MBEDTLS_DEFINITIONS})
30target_include_directories(lwip PRIVATE ${LWIP_INCLUDE_DIRS} ${LWIP_MBEDTLS_INCLUDE_DIRS})
31target_link_libraries(lwip ${LWIP_SANITIZER_LIBS})
32
33find_library(LIBPTHREAD pthread)
34target_link_libraries(lwip ${LIBPTHREAD})
Note: See TracBrowser for help on using the repository browser.