Skip to content

Commit

Permalink
Fix: GeniusSDK now building on Linux. SuperGenius build path needs to…
Browse files Browse the repository at this point in the history
… be fixed later on
  • Loading branch information
henriqueaklein committed May 25, 2024
1 parent f7a7e52 commit 9971145
Show file tree
Hide file tree
Showing 9 changed files with 37 additions and 895 deletions.
2 changes: 1 addition & 1 deletion build
82 changes: 0 additions & 82 deletions cmake/Android/CMakeLists.txt

This file was deleted.

70 changes: 36 additions & 34 deletions cmake/CommonBuildParameters.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,20 @@ set(BOOST_VERSION_2U "${BOOST_MAJOR_VERSION}_${BOOST_MINOR_VERSION}")

# --------------------------------------------------------
# define third party directory
if (NOT DEFINED THIRDPARTY_DIR)
print("Setting default third party directory")
set(THIRDPARTY_DIR "${CMAKE_CURRENT_LIST_DIR}/../../thirdparty")
## get absolute path
cmake_path(SET THIRDPARTY_DIR NORMALIZE "${THIRDPARTY_DIR}")
endif()

if (NOT DEFINED THIRDPARTY_BUILD_DIR)
print("Setting third party build directory default")
set(THIRDPARTY_BUILD_DIR "${THIRDPARTY_DIR}/build/${CMAKE_SYSTEM_NAME}/${CMAKE_BUILD_TYPE}")
endif()

print("THIRDPARTY BUILD DIR: ${THIRDPARTY_BUILD_DIR}")
print("THIRDPARTY SRC DIR: ${THIRDPARTY_DIR}")
#if (NOT DEFINED THIRDPARTY_DIR)
# print("Setting default third party directory")
# set(THIRDPARTY_DIR "${CMAKE_CURRENT_LIST_DIR}/../../thirdparty")
# ## get absolute path
# cmake_path(SET THIRDPARTY_DIR NORMALIZE "${THIRDPARTY_DIR}")
#endif()
#
#if (NOT DEFINED THIRDPARTY_BUILD_DIR)
# print("Setting third party build directory default")
# set(THIRDPARTY_BUILD_DIR "${THIRDPARTY_DIR}/build/${CMAKE_SYSTEM_NAME}/${CMAKE_BUILD_TYPE}")
#endif()
#
#print("THIRDPARTY BUILD DIR: ${THIRDPARTY_BUILD_DIR}")
#print("THIRDPARTY SRC DIR: ${THIRDPARTY_DIR}")

# --------------------------------------------------------
# Set config of GTest
Expand Down Expand Up @@ -62,24 +62,16 @@ include_directories(${yaml-cpp_INCLUDE_DIR})
# --------------------------------------------------------
# Set config of protobuf project
if (NOT DEFINED Protobuf_DIR)
set(Protobuf_DIR "${THIRDPARTY_BUILD_DIR}/grpc/lib/cmake/protobuf")
set(Protobuf_DIR "${_THIRDPARTY_BUILD_DIR}/grpc/lib/cmake/protobuf")
endif()
if (NOT DEFINED Protobuf_INCLUDE_DIR)
set(Protobuf_INCLUDE_DIR "${THIRDPARTY_BUILD_DIR}/grpc/include/google/protobuf")
if (NOT DEFINED grpc_INCLUDE_DIR)
set(grpc_INCLUDE_DIR "${_THIRDPARTY_BUILD_DIR}/grpc/include")
endif()
if (${CMAKE_SYSTEM_NAME} STREQUAL "iOS")
set(Protobuf_DIR "${iOS_Protobuf_DIR}")
set(Protobuf_INCLUDE_DIR "${iOS_Protobuf_INCLUDE_DIR}")
set(Protobuf_LIBRARIES "${iOS_Protobuf_LIBRARIES}")
if (NOT DEFINED Protobuf_INCLUDE_DIR)
set(Protobuf_INCLUDE_DIR "${grpc_INCLUDE_DIR}/google/protobuf")
endif()
# if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
# # TODO: Check grpc install on Windows
# set(Protobuf_DIR "${THIRDPARTY_BUILD_DIR}/grpc/build/third_party/protobuf/cmake")
# set(Protobuf_INCLUDE_DIR "${THIRDPARTY_BUILD_DIR}/grpc/build/third_party/protobuf/include/google/protobuf")
# endif()

find_package(Protobuf CONFIG REQUIRED )
include_directories(${Protobuf_INCLUDE_DIR})

if (NOT DEFINED PROTOC_EXECUTABLE)
set(PROTOC_EXECUTABLE "${THIRDPARTY_BUILD_DIR}/grpc/bin/protoc${CMAKE_EXECUTABLE_SUFFIX}")
Expand All @@ -101,6 +93,7 @@ if ( Protobuf_FOUND )
message( STATUS "Protobuf version : ${Protobuf_VERSION}" )
message( STATUS "Protobuf compiler : ${Protobuf_PROTOC_EXECUTABLE}")
endif()
include(${PROJECT_ROOT}/build/cmake/functions.cmake)
include(${PROJECT_ROOT}/cmake/functions.cmake)


Expand Down Expand Up @@ -141,7 +134,7 @@ include_directories(${RocksDB_INCLUDE_DIR})

# --------------------------------------------------------
# Set config of Microsoft.GSL
set(GSL_INCLUDE_DIR "${THIRDPARTY_BUILD_DIR}/GSL/include")
set(GSL_INCLUDE_DIR "${THIRDPARTY_BUILD_DIR}/Microsoft.GSL/include")
include_directories(${GSL_INCLUDE_DIR})

# --------------------------------------------------------
Expand Down Expand Up @@ -315,12 +308,21 @@ include_directories(${xxhash_INCLUDE_DIR})

# --------------------------------------------------------
# Set config of SuperGenius project
#if (NOT DEFINED SuperGenius_DIR)
print("Setting SuperGenius build directory default")
set(SUPERGENIUS_SRC_DIR "${CMAKE_CURRENT_LIST_DIR}/../../SuperGenius")
set(SuperGenius_DIR "${SUPERGENIUS_SRC_DIR}/build/${CMAKE_SYSTEM_NAME}/${CMAKE_BUILD_TYPE}/SuperGenius/lib/cmake/SuperGenius/")
set(SuperGenius_DIR "${SUPERGENIUS_SRC_DIR}/build/${CMAKE_SYSTEM_NAME}/${CMAKE_BUILD_TYPE}/")
#endif()
if (NOT DEFINED SUPERGENIUS_SRC_DIR)
if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/../../SuperGenius/README.md")
print("Setting default SuperGenius directory")
set(SUPERGENIUS_SRC_DIR "${CMAKE_CURRENT_LIST_DIR}/../../SuperGenius" CACHE STRING "Default SuperGenius Library")
## get absolute path
cmake_path(SET SUPERGENIUS_SRC_DIR NORMALIZE "${SUPERGENIUS_SRC_DIR}")
else()
message( FATAL_ERROR "Cannot find SuperGenius directory required to build" )
endif()
endif()

#set(SuperGenius_DIR "${SUPERGENIUS_SRC_DIR}/build/${CMAKE_SYSTEM_NAME}/${CMAKE_BUILD_TYPE}/SuperGenius/lib/cmake/SuperGenius/")
set(SuperGenius_DIR "${SUPERGENIUS_SRC_DIR}/.build/SuperGenius/lib/cmake/SuperGenius/")


print("SuperGenius_DIR: ${SuperGenius_DIR}")

find_package(SuperGenius CONFIG REQUIRED)
Expand Down
76 changes: 0 additions & 76 deletions cmake/CommonCompilerOptions.CMake

This file was deleted.

36 changes: 0 additions & 36 deletions cmake/Linux/CMakeLists.txt

This file was deleted.

63 changes: 0 additions & 63 deletions cmake/OSX/CMakeLists.txt

This file was deleted.

Loading

0 comments on commit 9971145

Please sign in to comment.