Fixed build for handling only static lib

This commit is contained in:
Guilhem Lavaux 2012-09-12 21:30:20 -04:00
parent dc03871f37
commit 0afe7b7eab
2 changed files with 6 additions and 3 deletions

View File

@ -1,4 +1,4 @@
SET(tolink ${GSL_LIBRARIES} CosmoTool)
SET(tolink ${GSL_LIBRARIES} CosmoTool ${CosmoTool_LIBS})
include_directories(${CMAKE_SOURCE_DIR}/src ${NETCDF_INCLUDE_PATH} ${GSL_INCLUDE_PATH})
add_executable(testBQueue testBQueue.cpp)

View File

@ -54,6 +54,9 @@ if (HDF5_FOUND)
include_directories(${HDF5_INCLUDE_DIRS})
endif (HDF5_FOUND)
message("${CosmoTool_LIBS}")
set(CosmoTool_LIBS ${CosmoTool_LIBS} PARENT_SCOPE)
if (BUILD_SHARED_LIBS)
add_library(CosmoTool SHARED ${CosmoTool_SRCS})
target_link_libraries(CosmoTool ${CosmoTool_LIBS})
@ -62,7 +65,7 @@ if (BUILD_SHARED_LIBS)
add_library(CosmoTool_static STATIC ${CosmoTool_SRCS})
endif(BUILD_STATIC_LIBS)
else (BUILD_SHARED_LIBS)
add_library(CosmoTool STATIC ${CosmoTool_LIBS})
add_library(CosmoTool STATIC ${CosmoTool_SRCS})
endif (BUILD_SHARED_LIBS)
install(TARGETS CosmoTool