diff --git a/CMakeLists.txt b/CMakeLists.txt index 72cb5ca..86879fb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,15 +5,13 @@ cmake_minimum_required (VERSION 2.8.11) project (cpp-jwt) -set(CMAKE_CXX_STANDARD 14) - SET( CMAKE_CXX_FLAGS "-std=c++14" ) include_directories (include) -find_package(OpenSSL REQUIRED) +#find_package(OpenSSL REQUIRED) include_directories(${OPENSSL_INCLUDE_DIR}) -list(APPEND LIB_LIST ${OPENSSL_LIBRARIES}) +link_directories(${OPENSSL_LIBRARIES}) # Recurse into the "Hello" and "Demo" subdirectories. This does not actually # cause another cmake executable to run. The same process will walk through diff --git a/cmake_command b/cmake_command new file mode 100644 index 0000000..8fc16f6 --- /dev/null +++ b/cmake_command @@ -0,0 +1 @@ +cmake -DOPENSSL_ROOT_DIR=/usr/local/Cellar/openssl/1.0.2j/ -DOPENSSL_LIBRARIES=/usr/local/Cellar/openssl/1.0.2j/lib/ -DOPENSSL_INCLUDE_DIR=/usr/local/Cellar/openssl/1.0.2j/include/ diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 849dc75..bbe1aa7 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -1,4 +1,15 @@ -add_library(libgtest IMPORTED STATIC GLOBAL) -add_executable (test_jwt_encode test_jwt_encode.cc) +include_directories(${OPENSSL_INCLUDE_DIR}) +link_directories(${OPENSSL_LIBRARIES}) + +add_executable(test_jwt_encode test_jwt_encode.cc) target_link_libraries(test_jwt_encode ssl crypto gtest) + +add_executable(test_jwt_decode test_jwt_decode.cc) +target_link_libraries(test_jwt_decode ssl crypto gtest) + +add_executable(test_jwt_decode_verifiy test_jwt_decode_verifiy.cc) +target_link_libraries(test_jwt_decode_verifiy ssl crypto gtest) + +add_executable(test_jwt_decode_verifiy_with_exception test_jwt_decode_verifiy_with_exception.cc) +target_link_libraries(test_jwt_decode_verifiy_with_exception ssl crypto gtest) diff --git a/tests/test_jwt_decode b/tests/test_jwt_decode index d44af51..29bc579 100755 Binary files a/tests/test_jwt_decode and b/tests/test_jwt_decode differ diff --git a/tests/test_jwt_decode_verifiy_with_exception b/tests/test_jwt_decode_verifiy_with_exception index f5aadf1..858928d 100755 Binary files a/tests/test_jwt_decode_verifiy_with_exception and b/tests/test_jwt_decode_verifiy_with_exception differ