diff --git a/CMakeLists.txt b/CMakeLists.txt index b81c8e437..8f94be237 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,6 +12,7 @@ include_directories("${PROJECT_SOURCE_DIR}/src") set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}/resources/cmake/") +include(ExternalProject) ############################################################# ## ## CMake options of StoRM @@ -181,6 +182,7 @@ message(STATUS "StoRM - Using Compiler Configuration: ${STORM_COMPILED_BY}") ############################################################# +add_subdirectory(resources/3rdparty) # Add the version of GMM in the repository to the include pathes set(GMMXX_INCLUDE_DIR "${PROJECT_SOURCE_DIR}/resources/3rdparty/gmm-5.0/include") include_directories(${GMMXX_INCLUDE_DIR}) @@ -434,6 +436,9 @@ endif() ## ############################################################# +message("${CUDD3_INCLUDE_DIR}") +include_directories(${CUDD3_INCLUDE_DIR}) +list(APPEND STORM_LINK_LIBRARIES ${CUDD3_STATIC_LIBRARIES}) ############################################################# ## @@ -529,7 +534,7 @@ endif() ## Sylvan ## ############################################################# -include(ExternalProject) + set(STORM_SYLVAN_ROOT "${PROJECT_SOURCE_DIR}/resources/3rdparty/sylvan") ExternalProject_Add( sylvan @@ -714,7 +719,6 @@ set(STORM_GENERATED_SOURCES "${PROJECT_BINARY_DIR}/src/utility/storm-version.cpp # Add the binary dir include directory for storm-config.h include_directories("${PROJECT_BINARY_DIR}/include") -add_subdirectory(resources/3rdparty) add_subdirectory(src) add_subdirectory(test) diff --git a/resources/3rdparty/CMakeLists.txt b/resources/3rdparty/CMakeLists.txt index 61115991b..e1a33ba4d 100644 --- a/resources/3rdparty/CMakeLists.txt +++ b/resources/3rdparty/CMakeLists.txt @@ -1,8 +1,8 @@ add_custom_target(resources) add_custom_target(test-resources) + if(STORM_SUPPORT_XML_FORMATS) - include(ExternalProject) ExternalProject_Add( xercesc SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/xercesc-3.1.2 @@ -38,13 +38,18 @@ ExternalProject_Add( DOWNLOAD_COMMAND "" SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/cudd-3.0.0 PREFIX ${CMAKE_CURRENT_BINARY_DIR}/cudd-3.0.0 - CONFIGURE_COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/cudd-3.0.0/configure --enable-shared --prefix=${CMAKE_CURRENT_BINARY_DIR}/cudd-3.0.0 --libdir=${CMAKE_CURRENT_BINARY_DIR}/cudd-3.0.0/lib CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} + CONFIGURE_COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/cudd-3.0.0/configure --enable-shared --enable-obj --prefix=${CMAKE_CURRENT_BINARY_DIR}/cudd-3.0.0 --libdir=${CMAKE_CURRENT_BINARY_DIR}/cudd-3.0.0/lib CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} BUILD_COMMAND make "CFLAGS=-O2 -w" INSTALL_COMMAND make install BUILD_IN_SOURCE 0 ) add_dependencies(resources cudd3) +ExternalProject_Get_Property(cudd3 binary_dir) +set(CUDD3_INCLUDE_DIR ${CMAKE_CURRENT_BINARY_DIR}/cudd-3.0.0/include PARENT_SCOPE) + +set(CUDD3_SHARED_LIBRARIES ${binary_dir}/libcudd${DYNAMIC_EXT} PARENT_SCOPE) +set(CUDD3_STATIC_LIBRARIES ${binary_dir}/libcudd${STATIC_EXT} PARENT_SCOPE) ExternalProject_Add( googletest