Commit 0bd579a6 authored by Oliver Horst's avatar Oliver Horst
Browse files

[chg] Moved netif xilinx specific code to its own port config

parent 1f71cf34
......@@ -2,6 +2,7 @@ cmake_minimum_required(VERSION 3.7 FATAL_ERROR)
option(ENABLE_INSTALL "Enable target installation possibility" ON)
option(WITH_HEADERS "Enable build of separate header library" ON)
option(WITH_PORTS "Enable building the lwIP config ports" ON)
project(
lwip-config
......@@ -39,12 +40,14 @@ target_link_libraries(
)
add_subdirectory(src-gen)
if (WITH_HEADERS)
add_subdirectory(include)
endif()
if (WITH_PORTS)
add_subdirectory(ports)
endif()
if (ENABLE_INSTALL)
# Configure and install the following files:
......@@ -88,40 +91,4 @@ if (ENABLE_INSTALL)
${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config-version.cmake
DESTINATION ${ConfigPackageLocation}
)
# If desired install all header files of the current project
if (WITH_HEADERS)
get_target_property(PROJECT_INCLUDE_DIRECTORIES ${PROJECT_NAME} INTERFACE_INCLUDE_DIRECTORIES)
foreach(DIR ${PROJECT_INCLUDE_DIRECTORIES})
string(REGEX MATCH "^.<BUILD_INTERFACE:(.*)>$" EXTRACTED_DIR ${DIR})
if (CMAKE_MATCH_1)
set(EXTRACTED_DIR "${CMAKE_MATCH_1}")
file(
GLOB_RECURSE
#
HEADER_FILES
#
FOLLOW_SYMLINKS
LIST_DIRECTORIES FALSE
RELATIVE "${EXTRACTED_DIR}"
#
"${EXTRACTED_DIR}/*.h"
"${EXTRACTED_DIR}/*.hpp"
)
foreach(FILE ${HEADER_FILES})
get_filename_component(INSTALL_PATH ${FILE} DIRECTORY)
install(
FILES ${EXTRACTED_DIR}/${FILE}
DESTINATION include/${INSTALL_PATH}
)
endforeach()
endif()
endforeach()
endif()
endif()
add_subdirectory(netif)
\ No newline at end of file
add_subdirectory(xilinx)
\ No newline at end of file
cmake_minimum_required(VERSION 3.7 FATAL_ERROR)
option(ENABLE_INSTALL "Enable target installation possibility" ON)
option(WITH_HEADERS "Enable build of separate header library" ON)
project(
lwip-netif-xilinx-config
#
VERSION 0.1
LANGUAGES C ASM
)
add_library(
lwip-netif-xilinx-config
#
INTERFACE
)
add_subdirectory(src-gen)
if (ENABLE_INSTALL)
# Configure and install the following files:
# - ${PROJECT_NAME}-config.cmake,
# - ${PROJECT_NAME}-config-version.cmake,
include(CMakePackageConfigHelpers)
set(ConfigPackageLocation lib/cmake/${PROJECT_NAME}-${PROJECT_VERSION})
# ${PROJECT_NAME}-config.cmake
configure_package_config_file(
${PROJECT_NAME}-config.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config.cmake
INSTALL_DESTINATION ${ConfigPackageLocation}
)
# ${PROJECT_NAME}-config-config-version.cmake
write_basic_package_version_file(
${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config-version.cmake
COMPATIBILITY SameMajorVersion
)
# Install exported CMake target files
install(
TARGETS ${PROJECT_NAME}
EXPORT ${PROJECT_NAME}-targets
ARCHIVE DESTINATION lib
)
install(
EXPORT ${PROJECT_NAME}-targets
DESTINATION ${ConfigPackageLocation}
EXPORT_LINK_INTERFACE_LIBRARIES
)
# Install package/module configuration files
install(
FILES
${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config.cmake
${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config-version.cmake
DESTINATION ${ConfigPackageLocation}
)
endif()
@PACKAGE_INIT@
include(CMakeFindDependencyMacro)
# Import targets
include(${CMAKE_CURRENT_LIST_DIR}/lwip-netif-xilinx-config-targets.cmake)
check_required_components(lwip-netif-xilinx-config)
cmake_minimum_required(VERSION 3.7 FATAL_ERROR)
target_sources(
lwip-config
lwip-netif-xilinx-config
#
INTERFACE
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/xtopology_g.c>
......
cmake_minimum_required(VERSION 3.7 FATAL_ERROR)
add_subdirectory(netif)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment