mirror of
https://github.com/eclipse/upm.git
synced 2025-07-01 09:21:12 +03:00
upmc: Updates for building C modules w/base UPM
Test commit for building C UPM modules. * Added C include directory * Added C utilities directory * Rename C++ upm.h -> upm.hpp to make room for C upm.h * Added upm_mixed_module_init function to src/CMakeLists.txt. This function takes filesnames similar to upm_module_init and does a bit of processing before calling upm_module_init. * Added c example directory. Changed c++ example names. * Added dfrph implemention for testing (C++ wraps C). Added mraa to .pc requires for dfrph. Tested against stand-alone project. Added dfrph c example. * Update implemention of pkg-config file generation. * Added two cmake cache variables: BUILDCPP and BUILDFTI * Removed src from swig_add_module calls, added libname to swig_link_libraries calls. Shrinks swig'ed binaries by ~13%. * Added install target in upm/CMakeLists.txt to install C header, directory. Is this where we want this? * C FTI header directory is include/fti Signed-off-by: Noel Eck <noel.eck@intel.com>
This commit is contained in:
@ -48,12 +48,14 @@ set (upm_VERSION_STRING ${upm_VERSION_MAJOR}.${upm_VERSION_MINOR}.${upm_VERSION_
|
||||
|
||||
set (CMAKE_SWIG_FLAGS "")
|
||||
|
||||
option (BUILDDOC "Build all doc." OFF)
|
||||
option (BUILDSWIGPYTHON "Build swig python modules." ON)
|
||||
option (BUILDSWIGNODE "Build swig node modules." ON)
|
||||
option (BUILDDOC "Build all doc" OFF)
|
||||
option (BUILDCPP "Build CPP sensor libraries" ON)
|
||||
option (BUILDFTI "Build Funtion Table Interface (FTI) in C sensor libraries" OFF)
|
||||
option (BUILDSWIGPYTHON "Build swig python modules" ON)
|
||||
option (BUILDSWIGNODE "Build swig node modules" ON)
|
||||
option (BUILDSWIGJAVA "Build swig java modules" OFF)
|
||||
option (BUILDPYTHON3 "Use python3 for building/installing/testing" OFF)
|
||||
option (BUILDEXAMPLES "Build C++ example binaries" OFF)
|
||||
option (BUILDEXAMPLES "Build C/C++ example binaries" OFF)
|
||||
option (BUILDJAVAEXAMPLES "Build java example jars" OFF)
|
||||
option (IPK "Generate IPK using CPack" OFF)
|
||||
option (RPM "Generate RPM using CPack" OFF)
|
||||
@ -238,18 +240,29 @@ if (BUILDSWIGPYTHON OR BUILDTESTS)
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
# UPM common headers
|
||||
set (UPM_COMMON_HEADER_DIRS
|
||||
${CMAKE_HOME_DIRECTORY}/include
|
||||
${CMAKE_HOME_DIRECTORY}/include/fti)
|
||||
|
||||
add_subdirectory (src)
|
||||
if(BUILDEXAMPLES)
|
||||
add_subdirectory (examples/c++)
|
||||
add_subdirectory (examples/c)
|
||||
if(BUILDCPP)
|
||||
add_subdirectory (examples/c++)
|
||||
endif(BUILDCPP)
|
||||
endif()
|
||||
|
||||
if(BUILDJAVAEXAMPLES)
|
||||
add_subdirectory (examples/java)
|
||||
endif()
|
||||
|
||||
|
||||
if (BUILDTESTS)
|
||||
find_package (PythonInterp ${PYTHONBUILD_VERSION} REQUIRED)
|
||||
enable_testing ()
|
||||
add_subdirectory (tests)
|
||||
endif()
|
||||
|
||||
# Install C headers
|
||||
install(DIRECTORY include/ DESTINATION include/upm
|
||||
FILES_MATCHING PATTERN "*.h")
|
||||
|
Reference in New Issue
Block a user