From 979dd668425d6a466f852f93d8f800d14a51e006 Mon Sep 17 00:00:00 2001 From: kdeng00 Date: Sun, 17 Nov 2019 13:55:01 -0500 Subject: [PATCH] Made it easier to build the bcrypt library --- CMakeLists.txt | 12 +++++++++--- README.md | 4 +--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 30fbe47..de6886e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -127,14 +127,20 @@ set(JWT_CPP_INCLUDE include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) conan_basic_setup() -find_library(BCRYPT bcrypt ${BCRYPTLIB}) +#find_library(BCRYPT bcrypt ${BCRYPTLIB}) -include_directories(include ${CPR_INCLUDE_DIRS} ${TAGLIB} ${TAGLIB_HEADERS} ${BCRYPTLIB}/) +include_directories(include ${CPR_INCLUDE_DIRS} ${TAGLIB} ${TAGLIB_HEADERS} ${BCRYPTLIB}) add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/cpr) add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/taglib) add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/oatpp) +add_library(bcrypt STATIC IMPORTED) + +set_target_properties(bcrypt PROPERTIES IMPORTED_LOCATION + "${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/libbcrypt/bcrypt.a" +) + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/appsettings.json ${CMAKE_BINARY_DIR}/bin/appsettings.json COPYONLY) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/authcredentials.json ${CMAKE_BINARY_DIR}/bin/authcredentials.json COPYONLY) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/database.json ${CMAKE_BINARY_DIR}/bin/database.json COPYONLY) @@ -143,4 +149,4 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Images/Stock/CoverArt.png ${CMAKE_BIN add_executable(icarus ${SOURCES} ${HEADERS}) target_include_directories(icarus PUBLIC ${JWT_CPP_INCLUDE}) -target_link_libraries(icarus "-lstdc++fs" tag oatpp mysqlclient ${CONAN_LIBS} ${CPR_LIBRARIES} ${BCRYPT}) +target_link_libraries(icarus "-lstdc++fs" tag oatpp mysqlclient ${CONAN_LIBS} ${CPR_LIBRARIES} bcrypt) diff --git a/README.md b/README.md index cf4debf..d2b848f 100644 --- a/README.md +++ b/README.md @@ -53,7 +53,7 @@ Replace [domain] with the domain name of the created tenant. This can be found i "client_secret": "Icankeepasecret" ``` -For the sake of this section, I will not go over configuring the API to accept the signing algorithm since it has already been configured in the [Startip](Startup.cs).cs file. Click on permissions to create the permissions for the API. +Click on permissions to create the permissions for the API.

@@ -151,8 +151,6 @@ From this point the database has been successfully created. Metadata and song fi git clone --recursive https://github.com/kdeng00/icarus cd 3rdparty/libbcrypt/ make -cp bcrypt.a libbcrypt.a -cp bcrypt.o libbcrypt.o cd ../.. mkdir build cd build