diff --git a/CMakeLists.txt b/CMakeLists.txt index b0a94ae..93e5429 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,11 +1,15 @@ -cmake_minimum_required(VERSION 3.15) +cmake_minimum_required(VERSION 3.5) project(IBME) -file(GLOB SOURCES src/* include/*) +file(GLOB SRC src/*) +file(GLOB INC include/*) -add_library(ibme ${SOURCES}) +add_library(ibme STATIC ${SRC} ${INC}) target_include_directories(ibme PUBLIC include) -target_link_libraries(ibme pbc gmp crypto) +#target_link_libraries(ibme) -add_subdirectory(demo) \ No newline at end of file +install(TARGETS ibme DESTINATION lib) +install(FILES ${INC} DESTINATION include/ibme) + +add_subdirectory(demo) diff --git a/demo/CMakeLists.txt b/demo/CMakeLists.txt index d8269a8..0abbe98 100644 --- a/demo/CMakeLists.txt +++ b/demo/CMakeLists.txt @@ -1,3 +1,3 @@ add_executable (demo demo.c demo.h) -target_link_libraries (demo LINK_PUBLIC ibme) \ No newline at end of file +target_link_libraries (demo LINK_PUBLIC ibme pbc gmp crypto) \ No newline at end of file