Skip to content

Commit

Permalink
use find macros to locate libsbml
Browse files Browse the repository at this point in the history
  • Loading branch information
0u812 committed Mar 16, 2016
1 parent 51fee11 commit f913e58
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 12 deletions.
42 changes: 42 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,10 @@ else()
include_directories(${LIBXML2_INCLUDE_DIR})
endif(WIN32)

find_library(LIBSBML_LIBRARY sbml HINTS ${THIRD_PARTY_INSTALL_FOLDER}/lib)
find_library(LIBSBML_STATIC_LIBRARY sbml-static HINTS ${THIRD_PARTY_INSTALL_FOLDER}/lib)
find_path(LIBSBML_INCLUDE_DIR sbml/SBMLTypes.h HINTS ${THIRD_PARTY_INSTALL_FOLDER}/include)


if (${BUILD_LLVM})
link_directories(
Expand Down Expand Up @@ -288,6 +292,44 @@ else()
message(STATUS "not building legacy C backend")
endif(BUILD_LEGACY_C)

message(STATUS "
-------------------------------------------------------------------------------
libRoadRunner Configuration Summary
-------------------------------------------------------------------------------
For up-to-date news and releases visit libroadrunner.org
Configured on host $ENV{COMPUTERNAME} ${HOSTNAME}
host OS ${CMAKE_SYSTEM_NAME}
host architecture ${CMAKE_SYSTEM_PROCESSOR}
General flags:
CC ${CMAKE_C_COMPILER}
CXX ${CMAKE_CXX_COMPILER}
CPPFLAGS ${BUILD_DEFINITIONS}
CFLAGS ${CMAKE_C_FLAGS}
CXXFLAGS ${CMAKE_CXX_FLAGS}
LDFLAGS ${CMAKE_EXE_LINKER_FLAGS}
Installation prefix: ${CMAKE_INSTALL_PREFIX}
Options:
With LLVM? ${BUILD_LLVM}
With legacy C? (DEP) ${BUILD_LEGACY_C}
Enable Python interface? ${BUILD_PYTHON}
Enable Java interface? ${BUILD_JAVA_INTERFACE}
Enable test suite? ${BUILD_TESTS}
Dependencies (packages marked with *** are required):
"
)

message( " *** libSBML")
message( " libSBML libs ${LIBSBML_LIBRARY}")
message( " libSBML static libs ${LIBSBML_STATIC_LIBRARY}")
message( " libSBML includes ${LIBSBML_INCLUDE_DIR}")

message( "" )

# We alway have to build the roadrunner core, everything depends on this
add_subdirectory(source)
Expand Down
2 changes: 1 addition & 1 deletion apps/rr/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ rr-libstruct-static
lapack
blas
f2c
sbml-static.a
${LIBSBML_STATIC_LIBRARY}
xml2
sundials_nvecserial.a
sundials_cvode.a
Expand Down
16 changes: 8 additions & 8 deletions source/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -248,16 +248,16 @@ if(RR_BUILD_SHARED_CORE)
if(UNIX)
target_link_libraries (${target}
pthread
sbml-static
${LIBSBML_STATIC_LIBRARY}
dl
f2c${staticLibExt}
)
else()
target_link_libraries (${target}
libf2c
libsbml
ws2_32
iphlpapi
${LIBSBML_LIBRARY}
ws2_32
iphlpapi
)
endif(UNIX)

Expand Down Expand Up @@ -330,17 +330,17 @@ target_link_libraries (${target}-static

if(WIN32)
target_link_libraries (${target}-static
libsbml-static
${LIBSBML_STATIC_LIBRARY}
libf2c
ws2_32
iphlpapi
ws2_32
iphlpapi
)
endif(WIN32)


if(UNIX)
target_link_libraries (${target}-static
sbml-static
${LIBSBML_STATIC_LIBRARY}
f2c
xml2
dl
Expand Down
2 changes: 1 addition & 1 deletion wrappers/Java/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ if(SWIG_FOUND)
roadrunner-static
rr-libstruct-static
nleq-static
sbml-static
${LIBSBML_STATIC_LIBRARY}
lapack
blas
f2c
Expand Down
4 changes: 2 additions & 2 deletions wrappers/Python/roadrunner/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ else(WIN32)
roadrunner
rr-libstruct-static
nleq-static
sbml-static
${LIBSBML_STATIC_LIBRARY}
lapack
blas
f2c
Expand All @@ -101,7 +101,7 @@ else(WIN32)
roadrunner-static
rr-libstruct-static
nleq-static
sbml-static
${LIBSBML_STATIC_LIBRARY}
lapack
blas
f2c
Expand Down

0 comments on commit f913e58

Please sign in to comment.