churchyard / rpms / smoldyn

Forked from rpms/smoldyn 9 months 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
@@ -73,10 +73,7 @@
 	source/lib/SFMT/SFMT.h
 	source/Smoldyn/smoldyn.h
 	source/Smoldyn/smoldynfuncs.h
-	source/vcell/SimpleMesh.h
-	source/vcell/SimpleValueProvider.h
 	source/NextSubVolume/nsvc.h
-	source/vtk/vtkwrapper.h
 )
 
 set(SRC_FILES
@@ -130,7 +127,7 @@
 set_source_files_properties(${SRC_FILES} PROPERTIES LANGUAGE CXX )
 set_source_files_properties(${MAIN_FILES} PROPERTIES LANGUAGE CXX )
 
-include_directories(source/lib source/Smoldyn source/vcell source/NextSubVolume source/vtk ${CMAKE_BINARY_DIR})
+include_directories(source/lib source/Smoldyn source/NextSubVolume source/vtk ${CMAKE_BINARY_DIR})
 
 
 
@@ -141,8 +138,8 @@
 endif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
 
 if(CMAKE_COMPILER_IS_GNUCXX OR COMPILER_IS_CLANGXX)
-	set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g -Wall -Wno-deprecated-declarations")
-	set(CMAKE_CXX_FLAGS_RELEASE "-O2 -Wall  -Wno-deprecated-declarations -DNDEBUG")
+	set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g -Wall -I/usr/include")
+	set(CMAKE_CXX_FLAGS_RELEASE "-O2 -Wall -DNDEBUG -I/usr/include")
 endif(CMAKE_COMPILER_IS_GNUCXX OR COMPILER_IS_CLANGXX)
 
 if(NOT CMAKE_BUILD_TYPE)
@@ -193,7 +190,7 @@
 	set(BNG2_PATH "/usr/local/bin/BioNetGen/BNG2.pl")
 else()
 	set(NIX_BUILD 1)
-	set(BNG2_PATH "/usr/local/bin/BioNetGen/BNG2.pl")
+	set(BNG2_PATH "${PERL_VENDORLIB}/BioNetGen/BNG2.pl")
 endif()
 
 
@@ -348,7 +345,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)
@@ -406,7 +404,7 @@
 
 	list(APPEND SRC_FILES source/vtk/vtkwrapper.cpp)
 	list(APPEND HEADER_FILES source/vtk/vtkwrapper.h)
-	add_definitions("-Wno-deprecated")
+	add_definitions(" ")
 	list(APPEND DEP_LIBS ${VTK_LIBRARIES})
 
 endif(OPTION_VTK)
@@ -430,7 +428,7 @@
 	endif()
 
 
-    set(Boost_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/source/NextSubVolume/boost_include)
+    set(Boost_INCLUDE_DIR ${INCLUDE_INSTALL_DIR}/boost)
     include_directories(SYSTEM ${Boost_INCLUDE_DIR})
 
 	list(APPEND SRC_FILES 
@@ -457,7 +455,7 @@
 					source/NextSubVolume/nsvc.h
 					)
 						
-	add_definitions("-Wno-deprecated")
+	add_definitions(" ")
 endif(OPTION_NSV)
 
 ####### Option: Build with PDE ##########
@@ -489,9 +487,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 source/Smoldyn/libsmoldyn.h source/Smoldyn/smoldyn.h ${CMAKE_CURRENT_BINARY_DIR}/smoldynconfigure.h DESTINATION include/smoldyn)
 	endif(OPTION_TARGET_LIBSMOLDYN)
 
 endif(NOT OPTION_MINGW)