Skip to content

Commit 227bc2f

Browse files
committed
Dirs restructured
1 parent 88a6588 commit 227bc2f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+9
-6
lines changed

CMakeLists.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ if (NOT DEFINED COMPONENT_DIR)
1111
set(CMAKE_CXX_STANDARD 11)
1212
set(CMAKE_CXX_STANDARD_REQUIRED ON)
1313

14-
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_LIST_DIR}/cmake ${CMAKE_CURRENT_LIST_DIR}/bs)
14+
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_LIST_DIR}/bs)
1515

1616
include(ExternalProject)
1717
include(package-linker)
@@ -22,7 +22,7 @@ if (NOT DEFINED COMPONENT_DIR)
2222

2323
add_library(tinyslip STATIC ${HEADER_FILES} ${SOURCE_FILES})
2424

25-
link_external_package(tinyhal ${CMAKE_CURRENT_LIST_DIR}/tinyhal)
25+
link_external_package(tinyhal ${CMAKE_CURRENT_LIST_DIR}/deps/tinyhal)
2626

2727
if (EXAMPLES)
2828
add_subdirectory(examples/linux/loopback)

Makefile

+1-2
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,7 @@ endif
4343
###################### Added HAL library #########################
4444

4545
PKG = tinyhal
46-
$(PKG)_SRCDIR = ./tinyhal
47-
$(PKG)_PKGCONFIG = tinyhal.pc
46+
$(PKG)_SRCDIR = ./deps/tinyhal
4847
$(eval $(package-make))
4948

5049
##################################################################

bs/package-linker.cmake

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ macro(link_external_package _NAME _PATH)
33
if (NOT DEFINED USE_EXTERNAL_${_NAME})
44
if (EXISTS ${_PATH}/CMakeLists.txt)
55
ExternalProject_Add(${_NAME}_external
6-
SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/${_NAME}"
6+
SOURCE_DIR "${_PATH}"
77
CMAKE_CACHE_ARGS
88
-DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_CURRENT_BINARY_DIR}/${_NAME}
99
)
@@ -20,6 +20,7 @@ macro(link_external_package _NAME _PATH)
2020
target_link_libraries(${PROJECT_NAME} PRIVATE ${_NAME})
2121
include_directories(${CMAKE_CURRENT_BINARY_DIR}/${_NAME}/usr/include)
2222
link_directories(${CMAKE_CURRENT_BINARY_DIR}/${_NAME}/usr/lib)
23+
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_BINARY_DIR}/${_NAME}/usr/share/cmake)
2324
else()
2425
find_package(${_NAME} REQUIRED)
2526
set(__local_PKG__INCLUDE_DIR "${NAME}_INCLUDE_DIRS")
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

tinyhal/CMakeLists.txt deps/tinyhal/CMakeLists.txt

+2
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ if (NOT DEFINED COMPONENT_DIR)
2727
string(SUBSTRING ${DIR} ${SLEN} -1 DIR)
2828
install(FILES ${HFILE} DESTINATION usr/include/${DIR})
2929
endforeach()
30+
install(FILES tinyhal.pc DESTINATION usr/lib/pkgconfig/)
31+
install(FILES Findtinyhal.cmake DESTINATION usr/share/cmake/)
3032

3133
if (UNITTEST)
3234
add_subdirectory(unittest)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

tinyhal/Makefile.common deps/tinyhal/Makefile.common

+2-1
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,10 @@ ifdef CONFIG_FOR_WINDOWS_BUILD
4545
xcopy src $(DESTDIR)\include /y /s &\
4646
for /R $(DESTDIR)\include %%G in (*) do ( if not %%~xG==.h del /F/Q/S %%G )
4747
else
48-
mkdir -p $(DESTDIR)/usr/include $(DESTDIR)/usr/lib
48+
mkdir -p $(DESTDIR)/usr/include $(DESTDIR)/usr/lib $(DESTDIR)/usr/lib/pkgconfig
4949
cp -r $(BLD)/$(TARGET_LIB) $(DESTDIR)/usr/lib/
5050
DST=`realpath $(DESTDIR)` && cd src && find ./ -name \*.h -exec cp --parents {} $${DST}/usr/include/ \; && cd ..
51+
cp -f tinyhal.pc $(DESTDIR)/usr/lib/pkgconfig/
5152
endif
5253

5354
docs:
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

tinyhal.pc deps/tinyhal/tinyhal.pc

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)