Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Static code implementation updates #96

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions languages/c/templates/modules/src/Module.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,3 @@ extern "C" {
#ifdef __cplusplus
}
#endif


24 changes: 18 additions & 6 deletions languages/c/templates/sdk/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,31 @@ project(Firebolt)

set(FIREBOLT_TRANSPORT_WAITTIME 1000 CACHE STRING "Maximum time to wait for Transport layer to get response")
set(FIREBOLT_LOGLEVEL "Info" CACHE STRING "Log level to be enabled")

option(FIREBOLT_ENABLE_STATIC_LIB "Create Firebolt library as Static library" OFF)
option(ENABLE_TESTS "Build openrpc native test" OFF)

if (NOT SYSROOT_PATH)
# Set sysroot to support PC builds, sysroot_path not configured case
set(SYSROOT_PATH "${CMAKE_SOURCE_DIR}/../../firebolt")
endif()

if (FIREBOLT_ENABLE_STATIC_LIB)
set(FIREBOLT_LIBRARY_TYPE STATIC)
else ()
set(FIREBOLT_LIBRARY_TYPE SHARED)
endif ()

if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
set(CMAKE_INSTALL_PREFIX "${SYSROOT_PATH}/usr" CACHE INTERNAL "" FORCE)
set(CMAKE_PREFIX_PATH ${SYSROOT_PATH}/usr/lib/cmake CACHE INTERNAL "" FORCE)
endif()

list(APPEND CMAKE_MODULE_PATH
"${CMAKE_SOURCE_DIR}/cmake"
"${SYSROOT_PATH}/usr/lib/cmake"
"${SYSROOT_PATH}/tools/cmake")
include(HelperFunctions)

if (NOT DEFINED CMAKE_PREFIX_PATH)
set(CMAKE_PREFIX_PATH ${SYSROOT_PATH}/usr/lib/cmake CACHE INTERNAL "" FORCE)
endif()

set(FIREBOLT_NAMESPACE ${PROJECT_NAME} CACHE STRING "Namespace of the project")

find_package(WPEFramework CONFIG REQUIRED)
Expand All @@ -45,5 +57,5 @@ endif()

# make sure others can make use cmake settings of Firebolt OpenRPC
configure_file( "${CMAKE_SOURCE_DIR}/cmake/project.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/${FIREBOLT_NAMESPACE}Config.cmake"
"${CMAKE_BINARY_DIR}/${FIREBOLT_NAMESPACE}Config.cmake"
@ONLY)
Loading
Loading