Skip to content
Snippets Groups Projects

Compiling libelas as static library

Merged d.kilic requested to merge 12-compile-libelas-as-static-library into master
All threads resolved!
1 file
+ 6
3
Compare changes
  • Side-by-side
  • Inline
  • 2a72544b
    Compiling libelas as static library · 2a72544b
    d.kilic authored
    - petrack_core is no longer built using -fpermissive
    - libelas is now turned OFF by default (since stereo functionality as a
    whole is)
+ 6
3
@@ -50,7 +50,7 @@ print_var(STEREO)
@@ -50,7 +50,7 @@ print_var(STEREO)
option(AVI "Use Avi File from Point Grey (currently not supported)" OFF)
option(AVI "Use Avi File from Point Grey (currently not supported)" OFF)
print_var(AVI)
print_var(AVI)
option(LIBELAS "Use Libelas" ON)
option(LIBELAS "Use Libelas" OFF)
print_var(LIBELAS)
print_var(LIBELAS)
option(DISABLE_STEREO "Disable Stereo features (currently must be taken)" ON)
option(DISABLE_STEREO "Disable Stereo features (currently must be taken)" ON)
@@ -156,7 +156,7 @@ add_executable(petrack src/main.cpp)
@@ -156,7 +156,7 @@ add_executable(petrack src/main.cpp)
target_link_libraries(petrack PRIVATE petrack_core)
target_link_libraries(petrack PRIVATE petrack_core)
# TODO we should remove this compile option and be more strict
# TODO we should remove this compile option and be more strict
target_compile_options(petrack_core PRIVATE "-fpermissive" ${COMMON_COMPILE_OPTIONS})
target_compile_options(petrack_core PRIVATE ${COMMON_COMPILE_OPTIONS})
target_compile_definitions(petrack_core PUBLIC STEREO_DISABLED)
target_compile_definitions(petrack_core PUBLIC STEREO_DISABLED)
#**********************************************************
#**********************************************************
@@ -205,13 +205,16 @@ target_sources(petrack_core PRIVATE src/analysePlot.cpp)
@@ -205,13 +205,16 @@ target_sources(petrack_core PRIVATE src/analysePlot.cpp)
#*************************************************************
#*************************************************************
if(LIBELAS)
if(LIBELAS)
target_compile_definitions(petrack_core PRIVATE LIBELAS)
target_compile_definitions(petrack_core PRIVATE LIBELAS)
target_sources(petrack_core PRIVATE
add_library(libelas STATIC
src/libelas/elasDescriptor.cpp
src/libelas/elasDescriptor.cpp
src/libelas/elas.cpp
src/libelas/elas.cpp
src/libelas/elasFilter.cpp
src/libelas/elasFilter.cpp
src/libelas/elasMatrix.cpp
src/libelas/elasMatrix.cpp
src/libelas/elasTriangle.cpp
src/libelas/elasTriangle.cpp
)
)
 
target_include_directories(libelas PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include)
 
target_compile_options(libelas PRIVATE "-fpermissive")
 
target_link_libraries(petrack_core PRIVATE libelas)
endif(LIBELAS)
endif(LIBELAS)
# TODO currently not available
# TODO currently not available
Loading