diff --git a/.gitignore b/.gitignore index 60c08359..014f49dc 100644 --- a/.gitignore +++ b/.gitignore @@ -186,3 +186,4 @@ structured-build/calcTexCoordBundler /VisualSFM /nv.ini /kd +/builddir diff --git a/ANNWrapper.cpp b/ANNWrapper.cpp index afe99637..21bbd49c 100644 --- a/ANNWrapper.cpp +++ b/ANNWrapper.cpp @@ -1,5 +1,4 @@ #include "ANNWrapper.h" - ANNWrapper::ANNWrapper() { m_anything_to_free = false; diff --git a/CMakeLists.txt b/CMakeLists.txt index 20b51828..0e155e84 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,7 +12,7 @@ PROJECT(threadedStereo) SET(THREADED_STEREO_LIB "ts") CMAKE_MINIMUM_REQUIRED(VERSION 2.4) - +set(CMAKE_CXX_STANDARD 98) # This can removed if the required cmake version is increased to 2.6 IF(COMMAND CMAKE_POLICY) CMAKE_POLICY(SET CMP0003 NEW) @@ -30,6 +30,7 @@ include(ExternalProject) FIND_PACKAGE( OpenCV REQUIRED ) pkg_check_modules(GOBJ REQUIRED gobject-2.0) pkg_check_modules(GLIB2 REQUIRED glib-2.0) +pkg_check_modules(ZLIB REQUIRED zlib) set(OSG_COMPONENTS osg osgUtil osgViewer osgGA osgManipulator osgText osgDB) find_package(OpenSceneGraph REQUIRED COMPONENTS ${OSG_COMPONENTS}) #GDAL @@ -57,19 +58,12 @@ ENDIF(INSOURCE) # eg. cmake . -DCMAKE_BUILD_TYPE=Release -DDEBUG_PROFILING=on -# Build types are: Release, Debug, RelWithDebInfo, MinSizeRel -IF( NOT CMAKE_BUILD_TYPE ) - SET( CMAKE_BUILD_TYPE Release ) -ENDIF( NOT CMAKE_BUILD_TYPE ) #-----------------------# # Installation Options # #-----------------------# -IF( NOT CMAKE_INSTALL_PREFIX ) - SET( CMAKE_INSTALL_PREFIX "/usr/local" ) -ENDIF( NOT CMAKE_INSTALL_PREFIX ) IF(USE_AUV_FOR_STEREO) message("Using AUV Code for Stereo") @@ -352,7 +346,6 @@ stereo_dense.cpp image_rect.cpp ANNWrapper.cpp ) -ADD_DEFINITIONS( "-g") ADD_LIBRARY( ${THREADED_STEREO_LIB} STATIC ${SRCS} ${SPINDEX_SRC}) TARGET_LINK_LIBRARIES (${THREADED_STEREO_LIB} ${THREADED_STEREO_LIB}-sonar) ADD_EXECUTABLE( ${CMAKE_PROJECT_NAME} threadedStereo.cpp ShellCmd.cpp ) @@ -386,7 +379,7 @@ ADD_EXECUTABLE(genOverlappingPoses genOverlappingPoses.cpp) #ADD_EXECUTABLE(temp temp.cpp) TARGET_LINK_LIBRARIES( genOverlappingPoses ${THREADED_STEREO_LIB} ) -SET(OGF_LIBS basic math cells numeric_stuff image z m ) +SET(OGF_LIBS basic math cells numeric_stuff image ${ZLIB_LIBRARIES} ) LINK_LIBRARIES(osgTerrain osgFX osg spindex vips vipsCC) TARGET_LINK_LIBRARIES( ${CMAKE_PROJECT_NAME} ${THREADED_STEREO_LIB} vips vipsCC vpb spindex ${THREADED_STEREO_LIB}-sonar ${OGF_LIBS}) #TARGET_LINK_LIBRARIES( engine ${THREADED_STEREO_LIB} vips vipsCC vpb spindex) @@ -412,10 +405,10 @@ TARGET_LINK_LIBRARIES( calcTexCoordDidson ${THREADED_STEREO_LIB} spindex vpb vip TARGET_LINK_LIBRARIES( singleImageTex ${THREADED_STEREO_LIB} spindex vpb vips vipsCC ${OGF_LIBS}) TARGET_LINK_LIBRARIES( borderClip ${THREADED_STEREO_LIB} spindex ) -TARGET_LINK_LIBRARIES( dumpPCD vips vipsCC ${THREADED_STEREO_LIB} z) +TARGET_LINK_LIBRARIES( dumpPCD vips vipsCC ${THREADED_STEREO_LIB} ${ZLIB_LIBRARIES}) -TARGET_LINK_LIBRARIES( dicedImage vips vipsCC ${THREADED_STEREO_LIB} z) -TARGET_LINK_LIBRARIES( sparseJoin vips vipsCC ${THREADED_STEREO_LIB} z) +TARGET_LINK_LIBRARIES( dicedImage vips vipsCC ${THREADED_STEREO_LIB} ${ZLIB_LIBRARIES}) +TARGET_LINK_LIBRARIES( sparseJoin vips vipsCC ${THREADED_STEREO_LIB} ${ZLIB_LIBRARIES}) #TARGET_LINK_LIBRARIES( threshold ${THREADED_STEREO_LIB} ) diff --git a/doc/building/#building.org# b/doc/building/#building.org# new file mode 100644 index 00000000..4829a3cf --- /dev/null +++ b/doc/building/#building.org# @@ -0,0 +1,20 @@ +First build requirements listed in [[file:requirements.org]]. + +#+title: Building +#+begin_src fish + mkdir builddir + cd builddir + cmake -DCMAKE_PREFIX_PATH=$HOME/.local -GNinja .. + cmake --build . +#+end_src + + +*** notes + +There's a lot of "legacy" linking in the cmake files, that is linking a library like: +#+BEGIN_SRC cmake +target_link_libraries(whatever osg) +#+END_SRC +where osg is not a cmake target. This causes -losg to be added to the compiler command line, +which can cause unexpected symbol search issues. You can set the environment variable ~LIBRARY_PATH~ to +work around this diff --git a/doc/building/building.org b/doc/building/building.org new file mode 100644 index 00000000..7ddae0cb --- /dev/null +++ b/doc/building/building.org @@ -0,0 +1,20 @@ +#+title: Building + +First build requirements listed in [[file:requirements.org]]. +#+begin_src fish + mkdir builddir + cd builddir + cmake -DCMAKE_PREFIX_PATH=$HOME/.local -GNinja .. + cmake --build . +#+end_src + + +*** notes + +There's a lot of "legacy" linking in the cmake files, that is linking a library like: +#+BEGIN_SRC cmake +target_link_libraries(whatever osg) +#+END_SRC +where osg is not a cmake target. This causes -losg to be added to the compiler command line, +which can cause unexpected symbol search issues. You can set the environment variable ~LIBRARY_PATH~ to +work around this diff --git a/doc/building/requirements.org b/doc/building/requirements.org new file mode 100644 index 00000000..ec9d91de --- /dev/null +++ b/doc/building/requirements.org @@ -0,0 +1,11 @@ +#+title: Requirements +#+description: build requirements for structured +#+keywords: build, dependencies, requirements +#+language: en +#+author: Charles Barto + +This file lists working versions of required libraries, +other versions may also work + ++ opencv 2.4 ++ OpenSceneGraph 3.2 diff --git a/gts-0.7.6/CMakeLists.txt b/gts-0.7.6/CMakeLists.txt index 01324f11..fe22eaad 100644 --- a/gts-0.7.6/CMakeLists.txt +++ b/gts-0.7.6/CMakeLists.txt @@ -4,6 +4,7 @@ #configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h) include(CheckIncludeFile) +include(CheckFunctionExists) check_function_exists (getopt_long HAVE_GETOPT_LONG) check_function_exists (getpagesize HAVE_GETPAGESIZE) diff --git a/ts-sonar/CMakeLists.txt b/ts-sonar/CMakeLists.txt index 7a99d876..aa2cba3e 100644 --- a/ts-sonar/CMakeLists.txt +++ b/ts-sonar/CMakeLists.txt @@ -1,6 +1,5 @@ file(GLOB implem_files *.cpp) file(GLOB header_files *.h) - set(LIB_NAME ${THREADED_STEREO_LIB}-sonar) include_directories (${EIGEN3_INCLUDE_DIRS}) diff --git a/vcgapps/numeric_stuff/ACE/amg_eigen_computation.cpp b/vcgapps/numeric_stuff/ACE/amg_eigen_computation.cpp index ddb2c428..7e097eb6 100644 --- a/vcgapps/numeric_stuff/ACE/amg_eigen_computation.cpp +++ b/vcgapps/numeric_stuff/ACE/amg_eigen_computation.cpp @@ -1,5 +1,6 @@ #include #include +#include #include #include #include "defs.h" @@ -11,7 +12,6 @@ #include "coarsen_amg.h" #include "coarsen_match.h" #include "RQI/rqi.h" -#include /******************************************** diff --git a/vrip/src/vrip/CMakeLists.txt b/vrip/src/vrip/CMakeLists.txt index 03c50afd..2f8ac1a6 100644 --- a/vrip/src/vrip/CMakeLists.txt +++ b/vrip/src/vrip/CMakeLists.txt @@ -7,7 +7,8 @@ message(FATAL_ERROR "csh is required please install") ENDIF() SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/vrip/src/vrip) -INCLUDE_DIRECTORIES( . ${TCL_INCLUDE_PATH} ${TK_INCLUDE_PATH}) +#set(CMAKE_INCLUDE_CURRENT_DIR ON) +INCLUDE_DIRECTORIES( ${TCL_INCLUDE_PATH} ${TK_INCLUDE_PATH}) file(COPY vripnew.csh DESTINATION ${PROJECT_SOURCE_DIR}/vrip/bin/) file(COPY vripsurf.csh DESTINATION ${PROJECT_SOURCE_DIR}/vrip/bin/) file(RENAME ${PROJECT_SOURCE_DIR}/vrip/bin/vripnew.csh ${PROJECT_SOURCE_DIR}/vrip/bin/vripnew ) diff --git a/vrip/src/vrip/strings.h b/vrip/src/vrip/strings.h index d653d655..bfaf6a68 100644 --- a/vrip/src/vrip/strings.h +++ b/vrip/src/vrip/strings.h @@ -1,3 +1,4 @@ + /* module: strings.h */ /* @(#)strings.h 1.25 */ diff --git a/vrip/src/vrip/vripGUICmds.h b/vrip/src/vrip/vripGUICmds.h index a9601f0e..2a14f011 100644 --- a/vrip/src/vrip/vripGUICmds.h +++ b/vrip/src/vrip/vripGUICmds.h @@ -20,7 +20,7 @@ CONCERNING THIS SOFTWARE. No support is implied or provided. #include -#include +#include "DepthMap.h" int Vrip_PhotoSliceCmd(ClientData, Tcl_Interp *interp, int argc, const char *argv[]); diff --git a/vsfm/CMakeLists.txt b/vsfm/CMakeLists.txt index 0011ba74..955ad3ec 100644 --- a/vsfm/CMakeLists.txt +++ b/vsfm/CMakeLists.txt @@ -1,4 +1,6 @@ set(LIB_DIR ${PROJECT_SOURCE_DIR}/vsfm/lib/) -FIND_PACKAGE(GTK2 REQUIRED) +find_package(PkgConfig REQUIRED) +pkg_check_modules(x11 REQUIRED IMPORTED_TARGET x11) +pkg_check_modules(gtk2 REQUIRED IMPORTED_TARGET gtk+-2.0) add_executable(VisualSFM dummy.c) -TARGET_LINK_LIBRARIES(VisualSFM ${LIB_DIR}/VisualSFM.a ${LIB_DIR}/lapack.a ${LIB_DIR}/blas.a ${LIB_DIR}/libf2c.a ${LIB_DIR}/libjpeg.a ${GTK2_LIBRARIES} gthread-2.0) \ No newline at end of file +TARGET_LINK_LIBRARIES(VisualSFM ${LIB_DIR}/VisualSFM.a ${LIB_DIR}/lapack.a ${LIB_DIR}/blas.a ${LIB_DIR}/libf2c.a ${LIB_DIR}/libjpeg.a ${GTK2_LIBRARIES} gthread-2.0 PkgConfig::x11 PkgConfig::gtk2)