Updated CMake lists

This commit is contained in:
Guilhem Lavaux 2010-09-15 20:51:18 +02:00
parent 2f460607f9
commit 82666a0606
3 changed files with 16 additions and 4 deletions

View File

@ -2,6 +2,8 @@ cmake_minimum_required(VERSION 2.6)
project(CosmoToolbox) project(CosmoToolbox)
option(BUILD_SHARED_LIBS "Build shared libraries." OFF)
find_path(NETCDF_INCLUDE_PATH NAMES netcdf.h) find_path(NETCDF_INCLUDE_PATH NAMES netcdf.h)
find_path(GSL_INCLUDE_PATH NAMES gsl/gsl_blas.h) find_path(GSL_INCLUDE_PATH NAMES gsl/gsl_blas.h)

View File

@ -1,4 +1,4 @@
SET(tolink ${CMAKE_BINARY_DIR}/src/libCosmoTool.so ${GSL_LIBRARY} ${GSLCBLAS_LIBRARY}) SET(tolink CosmoTool ${GSL_LIBRARY} ${GSLCBLAS_LIBRARY})
include_directories(${CMAKE_SOURCE_DIR}/src) include_directories(${CMAKE_SOURCE_DIR}/src)
add_executable(testBQueue testBQueue.cpp) add_executable(testBQueue testBQueue.cpp)
@ -9,3 +9,12 @@ target_link_libraries(testInterpolate ${tolink})
add_executable(testSmooth testSmooth.cpp) add_executable(testSmooth testSmooth.cpp)
target_link_libraries(testSmooth ${tolink}) target_link_libraries(testSmooth ${tolink})
add_executable(testkd testkd.cpp)
target_link_libraries(testkd ${tolink})
add_executable(testkd2 testkd2.cpp)
target_link_libraries(testkd2 ${tolink})
add_executable(testDelaunay testDelaunay.cpp)
target_link_libraries(testDelaunay ${tolink})

View File

@ -34,11 +34,12 @@ SET(CosmoTool_SRCS ${CosmoTool_SRCS}
yorick.hpp yorick.hpp
) )
add_library(CosmoTool SHARED ${CosmoTool_SRCS}) add_library(CosmoTool ${CosmoTool_SRCS})
target_link_libraries(CosmoTool ${NETCDF_LIBRARY} ${NETCDFCPP_LIBRARY}) target_link_libraries(CosmoTool ${NETCDF_LIBRARY} ${NETCDFCPP_LIBRARY} ${GSL_LIBRARY} ${GSLCBLAS_LIBRARY})
install(TARGETS CosmoTool install(TARGETS CosmoTool
LIBRARY DESTINATION lib) LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib)
install(DIRECTORY . DESTINATION include/CosmoTool install(DIRECTORY . DESTINATION include/CosmoTool
FILES_MATCHING PATTERN "*.hpp") FILES_MATCHING PATTERN "*.hpp")
install(DIRECTORY . DESTINATION include/CosmoTool install(DIRECTORY . DESTINATION include/CosmoTool