-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update library name and optimize imports
- Loading branch information
Showing
13 changed files
with
50 additions
and
50 deletions.
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
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,9 @@ | ||
@PACKAGE_INIT@ | ||
|
||
include(CMakeFindDependencyMacro) | ||
find_dependency(RELIC REQUIRED) | ||
link_libraries(${RLC_LIBRARY}) | ||
|
||
include("${CMAKE_CURRENT_LIST_DIR}/LibRBPTargets.cmake") | ||
|
||
check_required_components(LibRBP) |
2 changes: 1 addition & 1 deletion
2
cmake/RBPDependencies.cmake.in → cmake/LibRBPDependencies.cmake.in
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,3 +1,3 @@ | ||
# This file defines the dependencies of RBP, the RELIC package. | ||
find_package(RELIC REQUIRED) | ||
link_libraries(${RELIC_LIB}) | ||
link_libraries(${RLC_LIBRARY}) |
This file was deleted.
Oops, something went wrong.
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,14 +1,14 @@ | ||
cmake_minimum_required(VERSION 3.20) | ||
project(RBPTest) | ||
project(LibRBPDemo) | ||
|
||
set(CMAKE_CXX_STANDARD 17) | ||
set(CMAKE_CXX_STANDARD_REQUIRED ON) | ||
|
||
# Find the RBP library. | ||
find_package(RBP REQUIRED) | ||
find_package(LibRBP REQUIRED) | ||
|
||
# Create an executable. | ||
add_executable(demo demo.cpp) | ||
|
||
# Link the executable with the library. | ||
target_link_libraries(demo PUBLIC RBP::BP_LIB) | ||
target_link_libraries(demo PUBLIC LibRBP::LibRBP) |
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,25 +1,25 @@ | ||
# Get all header and source files. | ||
file(GLOB SOURCE_LIST CONFIGURE_DEPENDS "${RBP_SOURCE_DIR}/src/*.cpp") | ||
file(GLOB SOURCE_LIST CONFIGURE_DEPENDS "${PROJECT_SOURCE_DIR}/src/*.cpp") | ||
|
||
# Make an automatic library - will be static or dynamic based on user setting. | ||
add_library(BP_LIB ${SOURCE_LIST}) | ||
add_library(LibRBP ${SOURCE_LIST}) | ||
|
||
# Add this line: | ||
add_library(RBP::BP_LIB ALIAS BP_LIB) | ||
add_library(LibRBP::LibRBP ALIAS LibRBP) | ||
|
||
# We need this directory, and users of our library will need it too. | ||
target_include_directories(BP_LIB PUBLIC | ||
$<BUILD_INTERFACE:${RBP_SOURCE_DIR}/include> | ||
target_include_directories(LibRBP PUBLIC | ||
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include> | ||
$<INSTALL_INTERFACE:include> | ||
) | ||
|
||
target_link_libraries(BP_LIB PUBLIC ${RLC_LIBRARY}) | ||
target_link_libraries(LibRBP PUBLIC ${RLC_LIBRARY}) | ||
|
||
# Add this line to ensure RELIC's include directories are correctly passed | ||
target_include_directories(BP_LIB PUBLIC ${RELIC_INCLUDE_DIRS}) | ||
target_include_directories(LibRBP PUBLIC ${RLC_INCLUDE_DIRS}) | ||
|
||
# Add RPATH settings | ||
set_target_properties(BP_LIB PROPERTIES | ||
set_target_properties(LibRBP PROPERTIES | ||
INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib" | ||
BUILD_WITH_INSTALL_RPATH TRUE | ||
INSTALL_RPATH_USE_LINK_PATH TRUE) |
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,5 +1,5 @@ | ||
#include "bp.hpp" | ||
#include <gtest/gtest.h> | ||
#include "bp.hpp" | ||
|
||
TEST(RBPTests, Pairing){ | ||
const auto Bp = BP(); | ||
|
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
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