--- /dev/null
+build
+*.swp
--- /dev/null
+cmake_minimum_required (VERSION 2.6)
+project (stick)
+
+
+if(NOT CMAKE_SYSTEM_NAME STREQUAL "Windows")
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ansi")
+ set(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed" )
+endif()
+
+set(CMAKE_C_FLAGS_RELEASE "-DNDEBUG")
+if(CMAKE_BUILD_TYPE STREQUAL "Release")
+ # CMAKE_C_FLAGS_RELEASE is appended, but we need to prepend -O2 to take
+ # effect
+ set(CMAKE_C_FLAGS "-O2 ${CMAKE_C_FLAGS}")
+endif()
+
+set(PACKAGE_STRING stick)
+set(PACKAGE_BUGREPORT stefan.huber@ist.ac.at)
+set(PACKAGE_VERSION 0.1)
+
+if(NOT CMAKE_SYSTEM_NAME STREQUAL "Windows")
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -std=c99")
+ # I would like to use -pedantic, but VTK devs are not sufficiently
+ # pedantic
+ set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Werror")
+endif()
+
+add_subdirectory(include)
+add_subdirectory(lib)
+add_subdirectory(src)
--- /dev/null
+Copyright (c) 2013 Stefan Huber
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+of the Software, and to permit persons to whom the Software is furnished to do
+so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
--- /dev/null
+cd $(dirname $0)
+echo $PWD
+mkdir -p build
+cd build
+
+#cmake -D CMAKE_INSTALL_PREFIX:PATH=foo/ -D CMAKE_BUILD_TYPE="Debug" ..
+cmake -D CMAKE_BUILD_TYPE="Release" ..
--- /dev/null
+set(INCLUDE_DIR include/${PACKAGE_STRING}-${PACKAGE_VERSION})
+install (DIRECTORY ./ DESTINATION ${INCLUDE_DIR} FILES_MATCHING PATTERN "*.h")
--- /dev/null
+#ifndef lyxtor_h
+#define lyxtor_h
+
+void test();
+
+#endif
--- /dev/null
+set(stick_SRC stick.c)
+
+include_directories(${stick_SOURCE_DIR}/include)
+
+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libstick.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/libstick.pc @ONLY)
+
+add_library(stick SHARED ${stick_SRC})
+
+install(TARGETS stick DESTINATION lib)
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libstick.pc DESTINATION lib/pkgconfig COMPONENT "pkgconfig")
--- /dev/null
+prefix=@CMAKE_INSTALL_PREFIX@
+libdir=${prefix}/lib
+includedir=${prefix}/include
+
+Name: @PACKAGE_STRING@
+Description: A peristent homology libarary
+Version: @PACKAGE_VERSION@
+Libs: -L${libdir} -lm
+Cflags: -I${includedir}/@PACKAGE_STRING@-@PACKAGE_VERSION@
--- /dev/null
+#include <stdio.h>
+
+#include "stick.h"
+
+
+void test() {
+ printf("Hello world.\n");
+}
--- /dev/null
+set(stick_cli_SRC main.c)
+
+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h)
+include_directories(${CMAKE_CURRENT_BINARY_DIR})
+
+include_directories(${stick_SOURCE_DIR}/include)
+
+find_package(VTK REQUIRED)
+INCLUDE(${VTK_USE_FILE})
+
+add_executable(stick-cli ${stick_cli_SRC})
+target_link_libraries(stick-cli
+ stick
+ ${stick_cli_LIBS}
+ ${VTK_LIBRARIES} )
+
+install (TARGETS stick-cli DESTINATION bin)
--- /dev/null
+#define PACKAGE_STRING "@PACKAGE_STRING@"
+#define PACKAGE_VERSION "@PACKAGE_VERSION@"
+#define PACKAGE_BUGREPORT "@PACKAGE_BUGREPORT@"
+
--- /dev/null
+#include <stdio.h>
+#include <stdlib.h>
+
+#include <stick.h>
+
+int main(int argc, char* argv[]) {
+ (void) argc;
+ (void) argv;
+
+ test();
+ return EXIT_SUCCESS;
+}
+