File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -19,14 +19,25 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
1919set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -g" )
2020
2121include (FindPkgConfig)
22+
23+ if ( APPLE )
24+ # Support homebrew installed openssl
25+ find_library (LIBCRYPTO_LIBRARIES REQUIRED crypto PATHS /usr/local/opt/openssl/lib)
26+ set (LIBCRYPTO_INCLUDE_DIRS /usr/local/opt/openssl/include )
27+
28+ elseif ( UNIX )
29+
2230pkg_check_modules(LIBCRYPTO REQUIRED libcrypto)
31+ set_target_properties (SciTokens PROPERTIES LINK_FLAGS "-Wl,--version-script=${PROJECT_SOURCE_DIR} /configs/export-symbols" )
32+
33+ endif ()
34+
2335pkg_check_modules(SQLITE REQUIRED sqlite3)
2436
2537include_directories ( "${PROJECT_SOURCE_DIR} " ${JWT_CPP_INCLUDES} ${CURL_INCLUDES} ${LIBCRYPTO_INCLUDE_DIRS} ${SQLITE_INCLUDE_DIRS} )
2638
2739add_library (SciTokens SHARED src/scitokens.cpp src/scitokens_internal.cpp src/scitokens_cache.cpp)
2840target_link_libraries (SciTokens ${LIBCRYPTO_LIBRARIES} ${CURL_LIBRARIES} ${SQLITE_LIBRARIES} )
29- set_target_properties (SciTokens PROPERTIES LINK_FLAGS "-Wl,--version-script=${PROJECT_SOURCE_DIR} /configs/export-symbols" )
3041
3142add_executable (scitokens-test src/test .cpp)
3243target_link_libraries (scitokens-test SciTokens)
You can’t perform that action at this time.
0 commit comments