This repository has been archived by the owner on Sep 7, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cmake: create separate HLAPI library
Create new Hight Level API library, which should handle interactions with different system buses. Signed-off-by: Anton Bilohai <[email protected]>
- Loading branch information
Showing
5 changed files
with
69 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,4 @@ | ||
add_subdirectory(bpl) | ||
add_subdirectory(bpl) | ||
if (ENABLE_AMBIORIX) | ||
add_subdirectory(HLAPI) | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
project(hlapi VERSION ${prplmesh_VERSION}) | ||
|
||
message("${BoldWhite}Preparing ${BoldGreen}${PROJECT_NAME}${BoldWhite} for the ${BoldGreen}${TARGET_PLATFORM}${BoldWhite} platform${ColourReset}") | ||
|
||
# Set the base path for the current module | ||
set(MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) | ||
|
||
# Common Sources | ||
file(GLOB_RECURSE hlapi_sources ${MODULE_PATH}/*.c*) | ||
|
||
# Include AMBIORIX in the build | ||
message(STATUS "ENABLE_AMBIORIX: ${ENABLE_AMBIORIX}") | ||
find_package(amxb REQUIRED) | ||
find_package(amxc REQUIRED) | ||
find_package(amxd REQUIRED) | ||
find_package(amxj REQUIRED) | ||
find_package(amxo REQUIRED) | ||
find_package(amxp REQUIRED) | ||
list(APPEND HLAPI_LIBS amxb amxc amxd amxj amxo amxp) | ||
|
||
|
||
# Build the library | ||
add_library(${PROJECT_NAME} ${hlapi_sources}) | ||
set_target_properties(${PROJECT_NAME} PROPERTIES VERSION ${prplmesh_VERSION} SOVERSION ${prplmesh_VERSION_MAJOR}) | ||
set_target_properties(${PROJECT_NAME} PROPERTIES LINK_FLAGS "-Wl,-z,defs") | ||
target_link_libraries(${PROJECT_NAME} PRIVATE ${HLAPI_LIBS}) | ||
|
||
# Install | ||
target_include_directories(${PROJECT_NAME} | ||
PUBLIC | ||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> | ||
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/include> | ||
) | ||
|
||
install(TARGETS ${PROJECT_NAME} | ||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} | ||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} | ||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} | ||
) | ||
|
||
if(BUILD_TESTS) | ||
add_subdirectory(test) | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/* SPDX-License-Identifier: BSD-2-Clause-Patent | ||
* | ||
* SPDX-FileCopyrightText: 2020 the prplMesh contributors (see AUTHORS.md) | ||
* | ||
* This code is subject to the terms of the BSD+Patent license. | ||
* See LICENSE file for more details. | ||
*/ | ||
|
||
extern "C" { | ||
#include <amxc/amxc.h> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
/* SPDX-License-Identifier: BSD-2-Clause-Patent | ||
* | ||
* SPDX-FileCopyrightText: 2016-2020 the prplMesh contributors (see AUTHORS.md) | ||
* | ||
* This code is subject to the terms of the BSD+Patent license. | ||
* See LICENSE file for more details. | ||
*/ | ||
|
||
#ifndef _HL_API_H | ||
#define _HL_API_H |