churchyard / rpms / smoldyn

Forked from rpms/smoldyn a year ago
Clone
Blob Blame History Raw
--- CMakeLists.txt.fix_libpaths	2018-09-18 23:33:59.000000000 +0200
+++ CMakeLists.txt	2019-02-03 19:25:01.064012276 +0100
@@ -103,10 +103,7 @@
 	${CMAKE_SOURCE_DIR}/source/libSteve/SFMT/SFMT.h
 	${CMAKE_SOURCE_DIR}/source/Smoldyn/smoldyn.h
 	${CMAKE_SOURCE_DIR}/source/Smoldyn/smoldynfuncs.h
-	${CMAKE_SOURCE_DIR}/source/vcell/SimpleMesh.h
-	${CMAKE_SOURCE_DIR}/source/vcell/SimpleValueProvider.h
 	${CMAKE_SOURCE_DIR}/source/NextSubVolume/nsvc.h
-	${CMAKE_SOURCE_DIR}/source/vtk/vtkwrapper.h
 	)
 
 set(SRC_FILES
@@ -213,7 +210,7 @@
     set(APPLE_BUILD ON)
     message(STATUS "Compiling on an Apple computer")
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-deprecated -mmacosx-version-min=10.9")
-    set(BNG2_PATH "/usr/local/bin/BioNetGen/BNG2.pl")
+    set(BNG2_PATH "${PERL_VENDORLIB}/BioNetGen/BNG2.pl")
 elseif (WIN32)
     set(WINDOWS_BUILD ON)
     if(MSVC)
@@ -229,7 +226,7 @@
 else ()
     set(NIX_BUILD ON)
     message(STATUS "Compiling on a Linux computer")
-    set(BNG2_PATH "/usr/local/bin/BioNetGen/BNG2.pl")
+    set(BNG2_PATH "${PERL_VENDORLIB}/BioNetGen/BNG2.pl")
 endif ()
 
 message(STATUS "CMAKE_CXX_FLAGS variable: '${CMAKE_CXX_FLAGS}'")
@@ -397,7 +394,8 @@
         find_path(ZLIB_INCLUDE_DIRS zlib.h)
         find_library(ZLIB_LIBRARIES libz.a)
     else()
-        include(FindZlib)
+        find_path(ZLIB_INCLUDE_DIRS zlib.h PATHS ${INCLUDE_INSTALL_DIR})
+        find_library(ZLIB_LIBRARIES libz.so PATHS ${CMAKE_INSTALL_LIBDIR})
     endif()
 
     if(ZLIB_INCLUDE_DIRS AND ZLIB_LIBRARIES)
@@ -479,7 +477,7 @@
     endif ()
 
 
-    set(Boost_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/source/NextSubVolume/boost_include)
+    set(Boost_INCLUDE_DIR ${INCLUDE_INSTALL_DIR}/boost)
     include_directories(SYSTEM ${Boost_INCLUDE_DIR})
     message(STATUS "Boost headers found: '${Boost_INCLUDE_DIR}'")
 
@@ -554,11 +545,9 @@
     endif()
 
     if (OPTION_TARGET_LIBSMOLDYN)
-        install(TARGETS smoldyn_shared LIBRARY DESTINATION lib)
-        install(TARGETS smoldyn_static ARCHIVE DESTINATION lib)
-        install(FILES source/Smoldyn/libsmoldyn.h source/Smoldyn/smoldyn.h
-            ${CMAKE_CURRENT_BINARY_DIR}/smoldynconfigure.h
-            DESTINATION include)
+        install(TARGETS smoldyn_shared LIBRARY DESTINATION lib${LIB_SUFFIX}/smoldyn)
+        install(TARGETS smoldyn_static ARCHIVE DESTINATION lib${LIB_SUFFIX}/smoldyn)
+        install(FILES ${CMAKE_CURRENT_BINARY_DIR}/source/Smoldyn/libsmoldyn.h ${CMAKE_CURRENT_BINARY_DIR}/source/Smoldyn/smoldyn.h ${CMAKE_CURRENT_BINARY_DIR}/smoldynconfigure.h ${CMAKE_CURRENT_BINARY_DIR}/smoldynconfigure.h DESTINATION include/smoldyn)
     endif ()
 
 endif ()