diff --git a/CMakeLists.txt b/CMakeLists.txt index af2ac200dbf68e0d90e357feafeb84f3b418d075..ab9f81bedd388dcdfbda7785899cf95174d8994c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,19 +1,25 @@ +# Set cmake version. cmake_minimum_required(VERSION 3.24) + +# Project name and language. project( PPANN VERSION 0.1 - DESCRIPTION "Test" + DESCRIPTION "This project implements the inner product revealing encryption." LANGUAGES C ) +# Set standards and include tests. if (CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME) set(CMAKE_C_STANDARD 17) set_property(GLOBAL PROPERTY USE_FOLDERS ON) include(CTest) endif() +# Find the relic library. find_library(RELIC_LIB relic) +# Add desired subdirectories. add_subdirectory(src) add_subdirectory(apps) add_subdirectory(tests) \ No newline at end of file diff --git a/apps/CMakeLists.txt b/apps/CMakeLists.txt index 511f190f8a5fb12aba6115e85f053f676198765f..63f43d77e568953425fe69d23a691374a00edb3b 100644 --- a/apps/CMakeLists.txt +++ b/apps/CMakeLists.txt @@ -1,2 +1,3 @@ +# Call this executable app. add_executable(app scheme.c) target_link_libraries(app PRIVATE ppann_lib) \ No newline at end of file diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 1b1c1ad773ee20d8c27472c34136de81f4a85e99..109948d972988e2f326d4eba59959cc5c747dd44 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,14 +1,16 @@ +# Include the header list. set(HEADER_LIST "${CMAKE_SOURCE_DIR}/include/") +# Add all files to the library. add_library(ppann_lib field.c group.c vector.c matrix.c ${HEADER_LIST}) # We need this directory, and users of our library will need it too target_include_directories(ppann_lib PUBLIC ../include) -# This depends on (header only) boost +# This depends on the relic library. target_link_libraries(ppann_lib PRIVATE ${RELIC_LIB}) -# IDEs should put the headers in a nice place +# IDEs should put the headers in a nice place. source_group( TREE "${PROJECT_SOURCE_DIR}/include" PREFIX "Header Files"