Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Some build related fixes
  • Loading branch information
Mark Bolstad committed Feb 7, 2018
1 parent 5fa6320 commit 19e7585
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 16 deletions.
3 changes: 3 additions & 0 deletions CMakeLists.txt
Expand Up @@ -13,6 +13,9 @@ set (V3D_MAIN "${CMAKE_SOURCE_DIR}/v3d_main")
# Switch Qt versions
set(FORCE_QT4 ON CACHE BOOL "Build with Qt4")

# Disable Janelia version
set(JANELIA_BUILD OFF CACHE BOOL "Build for HHMI Janelia version")

# Sidestep compile trouble with boost 1.46 with MSVC11/2012
if(WIN32)
add_definitions(-DBOOST_NO_0X_HDR_INITIALIZER_LIST)
Expand Down
10 changes: 8 additions & 2 deletions build.cmake
Expand Up @@ -26,6 +26,7 @@ CMAKE_BUILD="Release"
CMAKE_EXE=""
BUILD_DIR=`pwd`
ROOT_DIR=`pwd`
NO_STOP_ON_ERROR="-i"

set -eu

Expand Down Expand Up @@ -66,7 +67,8 @@ while [[ $# > 0 ]]; do
PLATFORM="$1"
;;
-h5j)
CMAKE_ARGS+="-DUSE_FFMPEG:BOOL=ON -DUSE_X265:BOOL=ON -DUSE_HDF5:BOOL=ON"
CMAKE_ARGS+=" -DUSE_FFMPEG:BOOL=ON -DUSE_X265:BOOL=ON -DUSE_HDF5:BOOL=ON"
CMAKE_ARGS+=" -DJANELIA_BUILD:BOOL=ON "
BUILD_HDF5=1
;;
-v)
Expand All @@ -75,6 +77,9 @@ while [[ $# > 0 ]]; do
-qt5)
CMAKE_ARGS+=" -DFORCE_QT4:BOOL=OFF "
;;
-dev)
NO_STOP_ON_ERROR=""
;;
-16)
CMAKE_ARGS+=" -DHIGH_BIT_DEPTH:BOOL=ON "
;;
Expand Down Expand Up @@ -115,6 +120,7 @@ CMAKE_PLATFORM_ARGS="-DBOOST_ROOT:PATH=$boost_prefix "
if [ $PLATFORM = "windows-x86_64" ]; then
CMAKE_PLATFORM_ARGS+="-DTIFF_INCLUDE_DIR:PATH=$BUILD_DIR/build_$PLATFORM/v3d_main/common_lib/include "
CMAKE_PLATFORM_ARGS+="-DTIFF_LIBRARY:PATH=$BUILD_DIR/build_$PLATFORM/v3d_main/common_lib/winlib64/libtiff.lib "
CMAKE_PLATFORM_ARGS+="-DZLIB:FILEPATH=$BUILD_DIR/build_$PLATFORM/v3d_main/common_lib/winlib64/libzlib.lib "
CMAKE_PLATFORM_ARGS+="-DFFTW_INCLUDE_DIR:PATH=$BUILD_DIR/build_$PLATFORM/v3d_main/common_lib/fftw-3.3.4-dll64 "
CMAKE_PLATFORM_ARGS+="-DFFTW_LIBRARY:PATH=$BUILD_DIR/build_$PLATFORM/v3d_main/common_lib/fftw-3.3.4-dll64/libfftw3f-3.lib"
elif [ $PLATFORM = "linux-x86_64" ]; then
Expand Down Expand Up @@ -249,7 +255,7 @@ case $OPERATION in
devenv Vaa3D.sln -project INSTALL -build $CMAKE_BUILD -out install.txt
echo "Done."
else
make -i
make $NO_STOP_ON_ERROR
fi
;;
clean)
Expand Down
19 changes: 6 additions & 13 deletions v3d_main/CMakeLists.txt
Expand Up @@ -261,8 +261,8 @@ if(USE_HDF5)
HDF5
#URL ${CMAKE_CURRENT_SOURCE_DIR}/neuron_annotator/utility/hdf5-1.10.1.tar.gz
URL https://www.hdfgroup.org/package/gzip/?wpdmdl=4301&refresh=59dd1c8be460b1507662987
DOWNLOAD_NAME hdf-1.10.1.tar.gz
CMAKE_ARGS -DCMAKE_BUILD_TYPE:STRING=Release -DBUILD_SHARED_LIBS:BOOL=OFF
DOWNLOAD_NAME hdf-1.8.20.tar.gz
CMAKE_ARGS -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE} -DBUILD_SHARED_LIBS:BOOL=OFF
-DCMAKE_INSTALL_PREFIX:PATH=${hdf_dir}/install -DHDF5_BUILD_CPP_LIB:BOOL=ON
-DHDF5_BUILD_HL_LIB:BOOL=ON -DHDF5_BUILD_TOOLS:BOOL=ON
-DCMAKE_OSX_DEPLOYMENT_TARGET=${CMAKE_OSX_DEPLOYMENT_TARGET}
Expand All @@ -277,17 +277,10 @@ if(USE_HDF5)
set(HDF5_CPP_LIBRARY ${hdf_dir}/install/lib/hdf5_cpp.lib CACHE INTERNAL "path to a library")
set(HDF5_HL_CPP_LIBRARY ${hdf_dir}/install/lib/hdf5_hl_cpp.lib CACHE INTERNAL "path to a library")
else()
if(APPLE)
set(HDF5_LIBRARY ${hdf_dir}/install/lib/libhdf5${CMAKE_STATIC_LIBRARY_SUFFIX} CACHE INTERNAL "path to a library")
set(HDF5_HL_LIBRARY ${hdf_dir}/install/lib/libhdf5_hl${CMAKE_STATIC_LIBRARY_SUFFIX} CACHE INTERNAL "path to a library")
set(HDF5_CPP_LIBRARY ${hdf_dir}/install/lib/libhdf5_cpp${CMAKE_STATIC_LIBRARY_SUFFIX} CACHE INTERNAL "path to a library")
set(HDF5_HL_CPP_LIBRARY ${hdf_dir}/install/lib/libhdf5_hl_cpp${CMAKE_STATIC_LIBRARY_SUFFIX} CACHE INTERNAL "path to a library")
else()
set(HDF5_LIBRARY ${hdf_dir}/install/lib/libhdf5$<$<CONFIG:Debug>:_D>${CMAKE_STATIC_LIBRARY_SUFFIX} CACHE INTERNAL "path to a library")
set(HDF5_HL_LIBRARY ${hdf_dir}/install/lib/libhdf5_hl$<$<CONFIG:Debug>:_D>${CMAKE_STATIC_LIBRARY_SUFFIX} CACHE INTERNAL "path to a library")
set(HDF5_CPP_LIBRARY ${hdf_dir}/install/lib/libhdf5_cpp$<$<CONFIG:Debug>:_D>${CMAKE_STATIC_LIBRARY_SUFFIX} CACHE INTERNAL "path to a library")
set(HDF5_HL_CPP_LIBRARY ${hdf_dir}/install/lib/libhdf5_hl_cpp$<$<CONFIG:Debug>:_D>${CMAKE_STATIC_LIBRARY_SUFFIX} CACHE INTERNAL "path to a library")
endif()
set(HDF5_LIBRARY ${hdf_dir}/install/lib/libhdf5$<$<CONFIG:Debug>:_debug>${CMAKE_STATIC_LIBRARY_SUFFIX} CACHE INTERNAL "path to a library")
set(HDF5_HL_LIBRARY ${hdf_dir}/install/lib/libhdf5_hl$<$<CONFIG:Debug>:_debug>${CMAKE_STATIC_LIBRARY_SUFFIX} CACHE INTERNAL "path to a library")
set(HDF5_CPP_LIBRARY ${hdf_dir}/install/lib/libhdf5_cpp$<$<CONFIG:Debug>:_debug>${CMAKE_STATIC_LIBRARY_SUFFIX} CACHE INTERNAL "path to a library")
set(HDF5_HL_CPP_LIBRARY ${hdf_dir}/install/lib/libhdf5_hl_cpp$<$<CONFIG:Debug>:_debug>${CMAKE_STATIC_LIBRARY_SUFFIX} CACHE INTERNAL "path to a library")
endif()

include_directories(${HDF5_INCLUDE_DIR})
Expand Down
2 changes: 1 addition & 1 deletion v3d_main/neuron_tracing/CMakeLists.txt
Expand Up @@ -8,7 +8,7 @@ if(UNIX)
include_directories(/usr/local/include)
endif()

include_directories(${CMAKE_SOURCE_DIR}/common_lib/include)
#include_directories(${CMAKE_SOURCE_DIR}/common_lib/include)

SET(Boost_ADDITIONAL_VERSIONS "1.46.0" "1.57.0" "1.56.1" "1.56.0" "1.54" "1.54.0")
find_package(Boost COMPONENTS)
Expand Down

0 comments on commit 19e7585

Please sign in to comment.