-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
aeb3bc1
commit c1157b4
Showing
2 changed files
with
43 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,39 @@ | ||
cmake_minimum_required(VERSION 3.23) | ||
project(TokenGranterWrapper) | ||
# cmake_minimum_required(VERSION 3.23) | ||
# project(TokenGranterWrapperBindings) | ||
|
||
set(CMAKE_CXX_STANDARD 17) | ||
# set(CMAKE_CXX_STANDARD 17) | ||
|
||
# set(CURL_LIBRARY "-lcurl") | ||
# find_package(CURL REQUIRED) | ||
|
||
# # add_executable(token_granter src/token_granter.cpp) | ||
# # target_include_directories(token_granter PRIVATE ${CURL_INCLUDE_DIRS}) | ||
# # target_link_libraries(token_granter ${CURL_LIBRARIES}) | ||
|
||
# # SHARED LIBRARY COMPILATION HERE | ||
# add_library(token_granter_shared SHARED ./lib/src/token_granter.cpp) | ||
# target_link_libraries(token_granter_shared ${CURL_LIBRARIES}) | ||
# target_link_libraries(token_granter_shared ${CURL_LIBRARIES}) | ||
|
||
set(CURL_LIBRARY "-lcurl") | ||
find_package(CURL REQUIRED) | ||
|
||
# add_executable(token_granter src/token_granter.cpp) | ||
# target_include_directories(token_granter PRIVATE ${CURL_INCLUDE_DIRS}) | ||
# target_link_libraries(token_granter ${CURL_LIBRARIES}) | ||
# # PYBINDING SHARED LIBRARY COMPILATION HERE | ||
# add_subdirectory(./lib/include/pybind11) | ||
# pybind11_add_module(token_granter ./token_granter_wrapper/token_granter_bindings.cpp ./lib/src/token_granter.cpp) | ||
# set_target_properties(token_granter PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/token_granter_wrapper) | ||
# target_link_libraries(token_granter PRIVATE pybind11::module) | ||
# target_link_libraries(token_granter PRIVATE ${CURL_LIBRARIES}) | ||
|
||
# SHARED LIBRARY COMPILATION HERE | ||
add_library(token_granter_shared SHARED ./lib/src/token_granter.cpp) | ||
target_link_libraries(token_granter_shared ${CURL_LIBRARIES}) | ||
target_link_libraries(token_granter_shared ${CURL_LIBRARIES}) | ||
cmake_minimum_required(VERSION 3.23) | ||
project(TokenGranterWrapperBindings) | ||
set(CMAKE_CXX_STANDARD 17) | ||
|
||
|
||
# PYBINDING SHARED LIBRARY COMPILATION HERE | ||
add_subdirectory(./lib/include/pybind11) | ||
pybind11_add_module(token_granter ./token_granter_wrapper/token_granter_bindings.cpp ./lib/src/token_granter.cpp) | ||
set_target_properties(token_granter PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/token_granter_wrapper) | ||
target_link_libraries(token_granter PRIVATE pybind11::module) | ||
target_link_libraries(token_granter PRIVATE ${CURL_LIBRARIES}) | ||
add_subdirectory(./lib/src) | ||
|
||
|
||
set(SOURCE_DIR "token_granter_wrapper") | ||
set(SOURCES "${SOURCE_DIR}/token_granter_bindings.cpp") | ||
|
||
pybind11_add_module(token_granter_bindings ${SOURCES}) | ||
target_link_libraries(token_granter_bindings PRIVATE token_granter_wrapper) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
cmake_minimum_required(VERSION 3.23) | ||
project(TokenGranterWrapper) | ||
|
||
set(CMAKE_CXX_STANDARD 17) | ||
|
||
set(CURL_LIBRARY "-lcurl") | ||
find_package(CURL REQUIRED) | ||
|
||
add_library(token_granter_wrapper STATIC token_granter.cpp) | ||
|
||
target_link_libraries(token_granter_wrapper ${CURL_LIBRARIES}) |