Permalink
Browse files

Add share/tpie/tpie-config.cmake, and make example program use CMake …

…find_library(TPIE).
  • Loading branch information...
1 parent 0abf9d7 commit c12a2c84c9280d553304a6716e5bd3907d4e796a @Mortal Mortal committed Apr 2, 2012
Showing with 36 additions and 3 deletions.
  1. +1 −0 .gitignore
  2. +3 −1 CMakeLists.txt
  3. +4 −2 example/CMakeLists.txt
  4. +28 −0 share/tpie/tpie-config.cmake
View
@@ -7,6 +7,7 @@ CMakeCache.txt
CMakeFiles
CMakeLists.txt.user
/build*
+/example/build*
*#
.#*
/doc/tpie.aux
View
@@ -94,7 +94,6 @@ if (COMPILE_TEST)
ENABLE_TESTING()
add_subdirectory(test)
add_subdirectory(apps)
- add_subdirectory(example)
endif (COMPILE_TEST)
include(InstallRequiredSystemLibraries)
@@ -129,4 +128,7 @@ install(DIRECTORY tpie
FILES_MATCHING REGEX "\\.h$|\\.inl$"
PATTERN "deadcode" EXCLUDE)
+install(DIRECTORY share/tpie
+ DESTINATION share)
+
include(CPack)
View
@@ -1,3 +1,5 @@
+cmake_minimum_required(VERSION 2.8)
+find_package(TPIE REQUIRED)
+include_directories(${TPIE_INCLUDE_DIRS})
add_executable(helloworld helloworld.cpp)
-set_target_properties(helloworld PROPERTIES FOLDER tpie)
-target_link_libraries(helloworld tpie)
+target_link_libraries(helloworld ${TPIE_LIBRARIES})
@@ -0,0 +1,28 @@
+# Copyright 2011, The TPIE development team
+#
+# This file is part of TPIE.
+#
+# TPIE is free software: you can redistribute it and/or modify it under
+# the terms of the GNU Lesser General Public License as published by the
+# Free Software Foundation, either version 3 of the License, or (at your
+# option) any later version.
+#
+# TPIE is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+# License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with TPIE. If not, see <http://www.gnu.org/licenses/>
+
+set(Boost_USE_MULTITHREADED ON)
+if(WIN32)
+ set(Boost_USE_STATIC_LIBS ON)
+endif(WIN32)
+find_package(Boost COMPONENTS date_time thread filesystem system)
+
+find_path(TPIE_INCLUDE_DIR NAMES tpie/config.h)
+find_library(TPIE_LIBRARIES tpie)
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(TPIE DEFAULT_MSG TPIE_LIBRARIES TPIE_INCLUDE_DIR)
+list(APPEND TPIE_LIBRARIES ${Boost_LIBRARIES})

0 comments on commit c12a2c8

Please sign in to comment.