forked from he4rt/scylladb-php-driver
-
-
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.
Require built LibScyllaDB/LibCassandra (removed from source building)
Signed-off-by: Dusan Malusev <[email protected]>
- Loading branch information
1 parent
7686fd7
commit 40033a6
Showing
12 changed files
with
1,549 additions
and
675 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
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
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,66 +1,12 @@ | ||
if (PHP_SCYLLADB_LIBCASSANDRA_FROM_SRC) | ||
if (PHP_SCYLLADB_LIBCASSANDRA_STATIC) | ||
set(CASS_BUILD_STATIC ON) | ||
set(CASS_BUILD_SHARED OFF) | ||
else () | ||
set(CASS_BUILD_STATIC OFF) | ||
set(CASS_BUILD_SHARED ON) | ||
endif () | ||
find_package(PkgConfig REQUIRED) | ||
|
||
if (PHP_SCYLLADB_LIBUV_FROM_SRC) | ||
CPMAddPackage( | ||
NAME libcassandra | ||
GITHUB_REPOSITORY datastax/cpp-driver | ||
OPTIONS | ||
"CASS_CPP_STANDARD 17" | ||
"CASS_BUILD_STATIC ${CASS_BUILD_STATIC}" | ||
"CASS_BUILD_SHARED ${CASS_BUILD_SHARED}" | ||
"CASS_USE_STD_ATOMIC ON" | ||
"CASS_USE_TIMERFD ON" | ||
"CASS_USE_LIBSSH2 ON" | ||
"CASS_USE_ZLIB ON" | ||
"CMAKE_C_FLAGS ${CMAKE_C_FLAGS} -fPIC" | ||
"CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} -fPIC -Wno-error=redundant-move" | ||
"LIBUV_LIBRARY ${LIBUV_LIBRARY}" | ||
"LIBUV_INCLUDE_DIR ${libuv_SOURCE_DIR}/include" | ||
) | ||
else () | ||
CPMAddPackage( | ||
NAME libcassandra | ||
GITHUB_REPOSITORY datastax/cpp-driver | ||
OPTIONS | ||
"CASS_CPP_STANDARD 17" | ||
"CASS_BUILD_STATIC ${CASS_BUILD_STATIC}" | ||
"CASS_BUILD_SHARED ${CASS_BUILD_SHARED}" | ||
"CASS_USE_STD_ATOMIC ON" | ||
"CASS_USE_TIMERFD ON" | ||
"CASS_USE_LIBSSH2 ON" | ||
"CASS_USE_ZLIB ON" | ||
"CMAKE_C_FLAGS ${CMAKE_C_FLAGS} -fPIC" | ||
"CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} -fPIC -Wno-error=redundant-move" | ||
) | ||
endif () | ||
|
||
if (PHP_SCYLLADB_LIBCASSANDRA_STATIC) | ||
target_link_libraries(ext_scylladb PRIVATE cassandra_static) | ||
target_compile_definitions(ext_scylladb PRIVATE -DSCYLLADB_STATIC) | ||
else () | ||
target_link_libraries(ext_scylladb PRIVATE "libcassandra.so") | ||
endif () | ||
|
||
target_include_directories(ext_scylladb PUBLIC ${libcassandra_SOURCE_DIR}/include) | ||
set(CASSANDRA_H ${libcassandra_SOURCE_DIR}/include) | ||
if (PHP_SCYLLADB_LIBCASSANDRA_STATIC) | ||
pkg_check_modules(LIBCASSANDRA REQUIRED IMPORTED_TARGET cassandra_static) | ||
else () | ||
find_package(PkgConfig REQUIRED) | ||
|
||
if (PHP_SCYLLADB_LIBCASSANDRA_STATIC) | ||
pkg_check_modules(LIBCASSANDRA REQUIRED IMPORTED_TARGET cassandra_static) | ||
else () | ||
pkg_check_modules(LIBCASSANDRA REQUIRED IMPORTED_TARGET cassandra) | ||
endif () | ||
|
||
target_link_libraries(ext_scylladb PRIVATE ${LIBCASSANDRA_LIBRARIES}) | ||
target_link_directories(ext_scylladb PRIVATE ${LIBCASSANDRA_LIBRARY_DIRS}) | ||
target_include_directories(ext_scylladb PUBLIC ${LIBCASSANDRA_INCLUDE_DIRS}) | ||
set(CASSANDRA_H ${LIBCASSANDRA_INCLUDE_DIRS}) | ||
pkg_check_modules(LIBCASSANDRA REQUIRED IMPORTED_TARGET cassandra) | ||
endif () | ||
|
||
target_link_libraries(ext_scylladb PRIVATE ${LIBCASSANDRA_LIBRARIES}) | ||
target_link_directories(ext_scylladb PRIVATE ${LIBCASSANDRA_LIBRARY_DIRS}) | ||
target_include_directories(ext_scylladb PUBLIC ${LIBCASSANDRA_INCLUDE_DIRS}) | ||
set(CASSANDRA_H ${LIBCASSANDRA_INCLUDE_DIRS}) |
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
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,70 +1,12 @@ | ||
find_package(PkgConfig REQUIRED) | ||
|
||
if (PHP_SCYLLADB_LIBSCYLLADB_FROM_SRC) | ||
if (PHP_SCYLLADB_LIBSCYLLADB_STATIC) | ||
set(CASS_BUILD_STATIC ON) | ||
set(CASS_BUILD_SHARED OFF) | ||
else () | ||
set(CASS_BUILD_STATIC OFF) | ||
set(CASS_BUILD_SHARED ON) | ||
endif () | ||
|
||
if (PHP_SCYLLADB_LIBUV_FROM_SRC) | ||
CPMAddPackage( | ||
NAME libscylladb | ||
GITHUB_REPOSITORY "scylladb/cpp-driver" | ||
GIT_TAG master | ||
OPTIONS | ||
"CASS_CPP_STANDARD 17" | ||
"CASS_BUILD_STATIC ${CASS_BUILD_STATIC}" | ||
"CASS_BUILD_SHARED ${CASS_BUILD_SHARED}" | ||
"CASS_USE_STD_ATOMIC ON" | ||
"CASS_USE_TIMERFD ON" | ||
"CASS_USE_LIBSSH2 ON" | ||
"CASS_USE_ZLIB OFF" | ||
"CMAKE_C_FLAGS ${CMAKE_C_FLAGS} -fPIC" | ||
"CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} -fPIC -Wno-error=redundant-move" | ||
"LIBUV_LIBRARY ${LIBUV_LIBRARY}" | ||
"LIBUV_INCLUDE_DIR ${libuv_SOURCE_DIR}/include" | ||
) | ||
else () | ||
CPMAddPackage( | ||
NAME libscylladb | ||
GITHUB_REPOSITORY "scylladb/cpp-driver" | ||
GIT_TAG master | ||
OPTIONS | ||
"CASS_CPP_STANDARD 17" | ||
"CASS_BUILD_STATIC ${CASS_BUILD_STATIC}" | ||
"CASS_BUILD_SHARED ${CASS_BUILD_SHARED}" | ||
"CASS_USE_STD_ATOMIC ON" | ||
"CASS_USE_TIMERFD ON" | ||
"CASS_USE_LIBSSH2 ON" | ||
"CASS_USE_ZLIB OFF" | ||
"CMAKE_C_FLAGS ${CMAKE_C_FLAGS} -fPIC" | ||
"CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} -fPIC -Wno-error=redundant-move" | ||
) | ||
endif () | ||
|
||
if (PHP_SCYLLADB_LIBSCYLLADB_STATIC) | ||
target_link_libraries(ext_scylladb PRIVATE cassandra_static) | ||
target_compile_definitions(ext_scylladb PRIVATE -DSCYLLADB_STATIC) | ||
else () | ||
target_link_libraries(ext_scylladb PRIVATE "libscylla-cpp-driver.so") | ||
endif () | ||
|
||
target_include_directories(ext_scylladb PUBLIC ${libscylladb_SOURCE_DIR}/include) | ||
set(CASSANDRA_H ${libscylladb_SOURCE_DIR}/include) | ||
if (PHP_SCYLLADB_LIBSCYLLADB_STATIC) | ||
pkg_check_modules(LIBSCYLLADB REQUIRED IMPORTED_TARGET scylla-cpp-driver_static) | ||
else () | ||
find_package(PkgConfig REQUIRED) | ||
|
||
if (PHP_SCYLLADB_LIBSCYLLADB_STATIC) | ||
pkg_check_modules(LIBSCYLLADB REQUIRED IMPORTED_TARGET scylla-cpp-driver_static) | ||
else () | ||
pkg_check_modules(LIBSCYLLADB REQUIRED IMPORTED_TARGET scylla-cpp-driver) | ||
endif () | ||
|
||
message(STATUS "SCYLLA ${LIBSCYLLADB_INCLUDE_DIRS}") | ||
target_include_directories(ext_scylladb PUBLIC "${LIBSCYLLADB_INCLUDE_DIRS}") | ||
target_link_libraries(ext_scylladb PRIVATE "${LIBSCYLLADB_LIBRARIES}") | ||
target_link_directories(ext_scylladb PRIVATE "${LIBSCYLLADB_LIBRARY_DIRS}") | ||
set(CASSANDRA_H ${LIBSCYLLADB_INCLUDE_DIRS}) | ||
pkg_check_modules(LIBSCYLLADB REQUIRED IMPORTED_TARGET scylla-cpp-driver) | ||
endif () | ||
|
||
target_include_directories(ext_scylladb PUBLIC "${LIBSCYLLADB_INCLUDE_DIRS}") | ||
target_link_libraries(ext_scylladb PRIVATE "${LIBSCYLLADB_LIBRARIES}") | ||
target_link_directories(ext_scylladb PRIVATE "${LIBSCYLLADB_LIBRARY_DIRS}") | ||
set(CASSANDRA_H ${LIBSCYLLADB_INCLUDE_DIRS}) |
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
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
Oops, something went wrong.