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

fix for triangulation + qt5 upgrade #10

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
Open
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
40 changes: 36 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,37 @@
PROJECT(pixelstruct)
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
SET(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
#SET(CMAKE_VERBOSE_MAKEFILE ON)
# Created by the script cgal_create_CMakeLists
# This is the CMake script for compiling a set of CGAL applications.

project( pixelstruct )


cmake_minimum_required(VERSION 2.8.11)

# CGAL and its components
find_package( CGAL QUIET COMPONENTS Core )

if ( NOT CGAL_FOUND )

message(STATUS "This project requires the CGAL library, and will not be compiled.")
return()

endif()

# include helper file
include( ${CGAL_USE_FILE} )


# Boost and its components
find_package( Boost REQUIRED )

if ( NOT Boost_FOUND )

message(STATUS "This project requires the Boost library, and will not be compiled.")

return()

endif()

# include for local directory
ADD_SUBDIRECTORY(src)


137 changes: 132 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,134 @@
all:
mkdir -p build
cd build && cmake .. && $(MAKE)
cp build/src/pixelstruct .
# CMAKE generated file: DO NOT EDIT!
# Generated by "Unix Makefiles" Generator, CMake Version 3.6

# Default target executed when no arguments are given to make.
default_target: all

.PHONY : default_target

# Allow only one "make -f Makefile2" at a time, but pass parallelism.
.NOTPARALLEL:


#=============================================================================
# Special targets provided by cmake.

# Disable implicit rules so canonical targets will work.
.SUFFIXES:


# Remove some rules from gmake that .SUFFIXES does not remove.
SUFFIXES =

.SUFFIXES: .hpux_make_needs_suffix_list


# Suppress display of executed commands.
$(VERBOSE).SILENT:


# A target that is always out of date.
cmake_force:

.PHONY : cmake_force

#=============================================================================
# Set environment variables for the build.

# The shell in which to execute make rules.
SHELL = /bin/sh

# The CMake executable.
CMAKE_COMMAND = /usr/local/Cellar/cmake/3.6.2/bin/cmake

# The command to remove a file.
RM = /usr/local/Cellar/cmake/3.6.2/bin/cmake -E remove -f

# Escaping for special characters.
EQUALS = =

# The top-level source directory on which CMake was run.
CMAKE_SOURCE_DIR = /Users/johndpope/Documents/gitWorkspace/pixelstruct

# The top-level build directory on which CMake was run.
CMAKE_BINARY_DIR = /Users/johndpope/Documents/gitWorkspace/pixelstruct

#=============================================================================
# Targets provided globally by CMake.

# Special rule for the target edit_cache
edit_cache:
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake cache editor..."
/usr/local/Cellar/cmake/3.6.2/bin/ccmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
.PHONY : edit_cache

# Special rule for the target edit_cache
edit_cache/fast: edit_cache

.PHONY : edit_cache/fast

# Special rule for the target rebuild_cache
rebuild_cache:
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..."
/usr/local/Cellar/cmake/3.6.2/bin/cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
.PHONY : rebuild_cache

# Special rule for the target rebuild_cache
rebuild_cache/fast: rebuild_cache

.PHONY : rebuild_cache/fast

# The main all target
all: cmake_check_build_system
$(CMAKE_COMMAND) -E cmake_progress_start /Users/johndpope/Documents/gitWorkspace/pixelstruct/CMakeFiles /Users/johndpope/Documents/gitWorkspace/pixelstruct/CMakeFiles/progress.marks
$(MAKE) -f CMakeFiles/Makefile2 all
$(CMAKE_COMMAND) -E cmake_progress_start /Users/johndpope/Documents/gitWorkspace/pixelstruct/CMakeFiles 0
.PHONY : all

# The main clean target
clean:
rm -rf build pixelstruct
$(MAKE) -f CMakeFiles/Makefile2 clean
.PHONY : clean

# The main clean target
clean/fast: clean

.PHONY : clean/fast

# Prepare targets for installation.
preinstall: all
$(MAKE) -f CMakeFiles/Makefile2 preinstall
.PHONY : preinstall

# Prepare targets for installation.
preinstall/fast:
$(MAKE) -f CMakeFiles/Makefile2 preinstall
.PHONY : preinstall/fast

# clear depends
depend:
$(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1
.PHONY : depend

# Help Target
help:
@echo "The following are some of the valid targets for this Makefile:"
@echo "... all (the default if no target is provided)"
@echo "... clean"
@echo "... depend"
@echo "... edit_cache"
@echo "... rebuild_cache"
.PHONY : help



#=============================================================================
# Special targets to cleanup operation of make.

# Special rule to run CMake to check the build system integrity.
# No rule that depends on this can have commands that come from listfiles
# because they might be regenerated.
cmake_check_build_system:
$(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0
.PHONY : cmake_check_build_system

50 changes: 49 additions & 1 deletion README → README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,59 @@ from photographs. It uses the opensource structure-from-motion system
Bundler[2], which is based on the same research as Microsoft Live Labs
Photosynth[3].


![Alt text](/images/youtube.png "PixelStruct - photosynth viewer alternative")
https://www.youtube.com/watch?v=VFdNQc3gVkM



HOW TO COMPILE
PixelStruct requires the following libraries:
- Qt4 (with OpenGL support)
- Qt5 (with OpenGL support)
- CGAL


OSX
-------------------------------
brew install boost --with-python
brew install qt5
// brew install cgal // N.B. doesn't seem to link cgal_qt5 !?? nor does macports - use git + cmake below

1.) Clone this repo
cd pixelStruct

2.) clone GCAL inside directory https://github.com/johndpope/cgal/blob/master/INSTALL.md
git clone https://github.com/CGAL/cgal.git
cd cgal
mkdir -p build/debug
cd build/debug
cmake -DCMAKE_OSX_ARCHITECTURES=x86_64 -DCMAKE_BUILD_TYPE=Debug ../..
make
make install


3)
cd ../..
cmake -DCMAKE_OSX_ARCHITECTURES=x86_64 -DCGAL_DIR=/cgal .
make // here it's failing with Undefined symbols for architecture x86_64: on CGAL

OPTIONAL / SPIT OUT XCODE PROJECT
qmake -spec macx-xcode pixelstruct.pro
open xcode project


Troubleshooting
----------------------------------
export CXXFLAGS=-std=c++11 maybe not needed anymore?
export CPLUS_INCLUDE_PATH=/usr/include/python2.7

https://github.com/Homebrew/legacy-homebrew/issues/29938
replace 5.7.0 -> current version of qt!!!
sudo ln -s /usr/local/Cellar/qt5/5.7.0/mkspecs /usr/local/mkspecs && ln -s /usr/local/Cellar/qt5/5.7.0/plugins /usr/local/plugins




You will also need to install CMake in order to build PixelStruct.

All of the above can be installed in Ubuntu (and likely other Debian-based
Expand Down
Loading