-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
515 lines (423 loc) · 15.4 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
# Main CMakeLists.txt file to build Smoldyn, its libraries, and its utilities using CMake.
# Written by Steve Andrews, April 16, 2012.
# This file, and other files of the Smoldyn project, are licensed with LGPL license.
# The primary Smoldyn web site is http://www.smoldyn.org.
# Please report bugs and problems to [email protected].
########## Basic setup ##########
project(smoldyn-cplx)
cmake_minimum_required(VERSION 2.6)
set(SMOLDYN_VERSION "2.37")
######### Targets to build ###########
option(OPTION_TARGET_SMOLDYN "Create stand-alone Smoldyn program" ON)
option(OPTION_TARGET_LIBSMOLDYN "Create LibSmoldyn library" OFF)
####### Compiling options ##########
option(OPTION_VCELL "Compile Smoldyn for VCell" OFF)
option(OPTION_NSV "Compile Smoldyn with NextSubvolume functionality" OFF)
option(OPTION_PDE "Compile Smoldyn with PDE functionality" OFF)
option(OPTION_VTK "Compile Smoldyn with VTK functionality" OFF)
option(OPTION_STATIC "Compile Smoldyn with static libraries" OFF)
option(OPTION_MINGW "Cross-compile for Windows using MinGW compiler" OFF)
option(OPTION_USE_OPENGL "Build with OpenGL support" ON)
option(OPTION_USE_ZLIB "Build with Zlib support" OFF)
option(OPTION_OPENMP "Use OPENMP" OFF)
if (OPTION_VCELL)
set(OPTION_USE_LIBTIFF OFF)
set(OPTION_USE_ZLIB OFF)
set(HAVE_ZLIB TRUE)
set(OPTION_USE_ICONV OFF)
set(HAVE_ICONV FALSE)
else(OPTION_VCELL)
option(OPTION_USE_LIBTIFF "Build with LibTiff support" ON)
option(OPTION_USE_ICONV "Build with Libiconv support" OFF)
endif(OPTION_VCELL)
if (OPTION_NSV)
set(OPTION_LATTICE ON)
endif (OPTION_NSV)
if (OPTION_PDE)
set(OPTION_LATTICE ON)
endif (OPTION_PDE)
if (OPTION_STATIC)
set(OPTION_USE_ZLIB ON)
endif(OPTION_STATIC)
######### Core code information ###########
set(HEADER_FILES
source/lib/Geometry.h
source/lib/List.h #new in 2.37
source/lib/math2.h
source/lib/opengl2.h
source/lib/parse.h
source/lib/queue.h
source/lib/random2.h
source/lib/Rn.h
source/lib/RnSort.h
source/lib/rxnparam.h
source/lib/SimCommand.h
source/lib/Sphere.h
source/lib/string2.h
source/lib/SurfaceParam.h
source/lib/Zn.h
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
source/lib/Geometry.c
source/lib/List.c #new in 2.37
source/lib/math2.c
source/lib/opengl2.c
source/lib/parse.c
source/lib/queue.c
source/lib/random2.c
source/lib/Rn.c
source/lib/RnSort.c
source/lib/rxnparam.c
source/lib/SimCommand.c
source/lib/Sphere.c
source/lib/string2.c
source/lib/SurfaceParam.c
source/lib/Zn.c
source/lib/SFMT/SFMT.c
# source/Smoldyn/smolbng.c
source/Smoldyn/smolboxes.c
source/Smoldyn/smolcmd.c
source/Smoldyn/smolcomparts.c
source/Smoldyn/smolfilament.c
source/Smoldyn/smolgraphics.c
source/Smoldyn/smolmolec.c
source/Smoldyn/smolport.c
source/Smoldyn/smollattice.c
source/Smoldyn/smolsim.c
source/Smoldyn/smolreact.c
source/Smoldyn/smolsurface.c
source/Smoldyn/smolwall.c
#source/glib-2.53.1/glib/ghash.c
)
set(MAIN_FILES source/Smoldyn/smoldyn.c)
if(OPTION_VCELL)
list(APPEND SRC_FILES
source/Smoldyn/smoldynhybrid.c
source/vcell/SimpleMesh.c
source/vcell/SimpleValueProvider.c )
endif(OPTION_VCELL)
if(OPTION_TARGET_LIBSMOLDYN)
list(APPEND HEADER_FILES source/Smoldyn/libsmoldyn.h)
list(APPEND SRC_FILES source/Smoldyn/libsmoldyn.c)
endif(OPTION_TARGET_LIBSMOLDYN)
set_source_files_properties(${SRC_FILES} PROPERTIES LANGUAGE CXX )
set_source_files_properties(${MAIN_FILES} PROPERTIES LANGUAGE CXX )
#set_source_files_properties(${SRC_FILES} PROPERTIES LANGUAGE C)
#set_source_files_properties(${MAIN_FILES} PROPERTIES LANGUAGE C)
include_directories(source/lib source/Smoldyn source/vcell source/NextSubVolume source/vtk ${CMAKE_BINARY_DIR})
####### Build for debugging or release ##########
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
set(COMPILER_IS_CLANGXX TRUE)
endif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
if(CMAKE_COMPILER_IS_GNUCXX OR COMPILER_IS_CLANGXX)
set(CMAKE_CXX_FLAGS_DEBUG "-g -Wall")
# set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g -Wall -Wno-deprecated-declarations")
# set(CMAKE_CXX_FLAGS_RELEASE "-O2 -Wall -Wno-deprecated-declarations -DNDEBUG")
endif(CMAKE_COMPILER_IS_GNUCXX OR COMPILER_IS_CLANGXX)
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release CACHE STRING
"Choose the buid type: None, Debug, Release, RelWithDebInfo, or MinSizeRel" FORCE)
endif(NOT CMAKE_BUILD_TYPE)
message(STATUS "Build type: ${CMAKE_BUILD_TYPE}")
####### Option: Compile with MinGW ##########
if (OPTION_MINGW)
message(STATUS "Cross-compiling for Windows using MinGW libraries from: ${MINGWDIR}")
endif(OPTION_MINGW)
######### Platform dependent information ##########
list(APPEND DEP_LIBS /usr/lib/x86_64-linux-gnu/libglib-2.0.so)
list(APPEND DEP_LIBS /usr/lib/x86_64-linux-gnu/libgsl.so)
list(APPEND DEP_LIBS /usr/lib/x86_64-linux-gnu/libgslcblas.so)
if (OPTION_VCELL)
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/windows/glut-3.7.6)
link_directories(${CMAKE_CURRENT_SOURCE_DIR}/source/vcell ${CMAKE_CURRENT_SOURCE_DIR}/windows/glut-3.7.6)
if (ARCH_64bit)
list(APPEND DEP_LIBS glut64)
else()
list(APPEND DEP_LIBS glut32 zlib)
endif()
elseif (OPTION_MINGW)
include_directories(${MINGWDIR}/include windows)
link_directories(${MINGWDIR}/lib)
#list(APPEND DEP_LIBS opengl32 glu32 freeglut z)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -static")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -static")
set(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "${CMAKE_SHARED_LIBRARY_LINK_C_FLAGS} -static -s ")
set(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "${CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS} -static -s")
endif()
set(APPLE_BUILD 0)
set(NIX_BUILD 0)
set(WINDOWS_BUILD 0)
if(OPTION_MINGW)
set(WINDOWS_BUILD 1)
elseif(APPLE)
set(APPLE_BUILD 1)
else()
set(NIX_BUILD 1)
endif()
####### Option: Build with OpenGL (gl and glu only, not glut) ##########
if (OPTION_USE_OPENGL AND OPTION_VCELL)
set(HAVE_OPENGL TRUE)
set(HAVE_GL_GLU_H TRUE)
set(HAVE_GL_GL_H TRUE)
elseif(OPTION_USE_OPENGL)
if(OPTION_MINGW)
find_file(HAVE_GL_GL_H GL/gl.h PATHS ${MINGWDIR}/include)
find_file(HAVE_OPENGL_GL_H OpenGL/gl.h PATHS ${MINGWDIR}/include)
find_file(HAVE_GL_GLU_H GL/glu.h PATHS ${MINGWDIR}/include)
find_file(HAVE_OPENGL_GLU_H OpenGL/glu.h PATHS ${MINGWDIR}/include)
#find_path(OPEN_GL_INCLUDE_DIR gl.h PATHS ${MINGWDIR}/include/GL)
get_filename_component(OPEN_GL_INCLUDE_DIR "${HAVE_GL_GL_H}" PATH)
find_library(OPEN_GL_LIBRARIES libopengl32.a PATHS ${MINGWDIR}/lib)
find_library(GLU32_LIBRARIES libglu32.a PATHS ${MINGWDIR}/lib)
else()
find_file(HAVE_GL_GL_H GL/gl.h)
find_file(HAVE_OPENGL_GL_H OpenGL/gl.h)
find_file(HAVE_GL_GLU_H GL/glu.h)
find_file(HAVE_OPENGL_GLU_H OpenGL/glu.h)
include(FindOpenGL)
endif()
if(OPENGL_FOUND)
set(OPENGL_FOUND TRUE)
message(STATUS "OpenGL found: '${OPENGL_INCLUDE_DIR}', '${OPENGL_LIBRARIES}'")
elseif(OPEN_GL_INCLUDE_DIR AND OPEN_GL_LIBRARIES)
set(OPENGL_FOUND TRUE)
message(STATUS "OpenGL found: '${OPEN_GL_INCLUDE_DIR}', '${OPEN_GL_LIBRARIES}'")
else()
set(OPENGL_FOUND FALSE)
message(FATAL_ERROR "OpenGL not found. Building without OpenGL is possible.")
endif()
if(OPTION_MINGW)
if(GLU32_LIBRARIES)
message(STATUS "Glu32 found: '${GLU32_LIBRARIES}'")
else()
message(FATAL_ERROR "Glu32 not found. Building without OpenGL is possible.")
endif()
endif(OPTION_MINGW)
set(HAVE_OPENGL TRUE)
include_directories(${OPENGL_INCLUDE_DIR} ${OPEN_GL_INCLUDE_DIR})
list(APPEND DEP_LIBS ${OPENGL_LIBRARIES} ${OPEN_GL_LIBRARIES} ${GLU32_LIBRARIES})
endif()
####### Option: Build with OpenGL (glut only) ##########
if (OPTION_USE_OPENGL AND OPTION_VCELL)
set(HAVE_GL_GLUT_H TRUE)
elseif(OPTION_USE_OPENGL)
if(OPTION_MINGW)
find_file(HAVE_GL_GLUT_H GL/glut.h PATHS ${MINGWDIR}/include)
find_file(HAVE_GLUT_GLUT_H GLUT/glut.h PATHS ${MINGWDIR}/include)
get_filename_component(GLUT_INCLUDE_DIR "${HAVE_GL_GLUT_H}" PATH)
#find_path(GLUT_INCLUDE_DIR glut.h PATHS ${MINGWDIR}/include/GL)
find_library(GLUT_LIBRARIES libfreeglut.a PATHS ${MINGWDIR}/lib)
# elseif(OPTION_STATIC)
# find_file(HAVE_GL_FREEGLUT_H GL/freeglut.h)
# find_path(GLUT_INCLUDE_DIR GL/freeglut.h)
# find_library(GLUT_LIBRARIES libglut.a)
else()
find_file(HAVE_GL_GLUT_H GL/glut.h)
find_file(HAVE_GLUT_GLUT_H GLUT/glut.h)
include(FindGLUT)
#find_file(HAVE_GL_FREEGLUT_H GL/freeglut.h)
#find_path(GLUT_INCLUDE_DIR GL/freeglut.h)
#find_library(GLUT_LIBRARIES NAMES libglut)
endif()
if(GLUT_FOUND)
set(GLUT_FOUND TRUE)
message(STATUS "Glut found: '${GLUT_INCLUDE_DIR}', '${GLUT_LIBRARIES}'")
elseif(GLUT_INCLUDE_DIR AND GLUT_LIBRARIES)
set(GLUT_FOUND TRUE)
message(STATUS "Glut found: '${GLUT_INCLUDE_DIR}', '${GLUT_LIBRARIES}'")
else()
set(GLUT_FOUND FALSE)
message(FATAL_ERROR "Glut not found. Building without OpenGL is possible.")
endif()
set(HAVE_OPENGL TRUE)
include_directories(${GLUT_INCLUDE_DIR})
list(APPEND DEP_LIBS ${GLUT_LIBRARIES})
endif()
####### Build with LibX11 (only required for static build on Mac) ##########
#if(OPTION_STATIC AND OPTION_USE_OPENGL AND HAVE_OPENGL)
# FIND_PACKAGE(X11)
# if(X11_FOUND)
# message(STATUS "Found X11: '${X11_INCLUDE_DIR}', '${X11_LIBRARIES}'")
# else()
# message(FATAL_ERROR "X11 not found")
# endif()
# include_directories(${X11_INCLUDE_DIR})
# list(APPEND DEP_LIBS ${X11_LIBRARIES})
#endif()
####### Option: Build with LibTiff ##########
if(OPTION_USE_LIBTIFF)
if(NOT HAVE_OPENGL)
message(WARNING "LibTiff won't be used because build does not include OpenGL.")
endif()
if(OPTION_MINGW)
find_path(TIFF_INCLUDE_DIR tiff.h PATHS ${MINGWDIR}/include NO_DEFAULT_PATH)
find_library(TIFF_LIBRARY libtiff.a PATHS ${MINGWDIR}/lib NO_DEFAULT_PATH)
elseif(OPTION_STATIC)
find_path(TIFF_INCLUDE_DIR tiff.h)
find_library(TIFF_LIBRARY libtiff.a)
else()
FIND_PACKAGE(TIFF)
endif()
if(TIFF_INCLUDE_DIR AND TIFF_LIBRARY)
set(HAVE_LIBTIFF TRUE)
message(STATUS "Found Libtiff: '${TIFF_INCLUDE_DIR}', '${TIFF_LIBRARY}'")
else()
set(HAVE_LIBTIFF FALSE)
message(FATAL_ERROR "Libtiff not found")
endif()
include_directories(${TIFF_INCLUDE_DIR})
list(APPEND DEP_LIBS ${TIFF_LIBRARY})
endif(OPTION_USE_LIBTIFF)
####### Option: Build with Zlib ##########
if(OPTION_USE_ZLIB)
if(OPTION_MINGW)
find_path(ZLIB_INCLUDE_DIRS zlib.h PATHS ${MINGWDIR}/include NO_DEFAULT_PATH)
find_library(ZLIB_LIBRARIES libz.a PATHS ${MINGWDIR}/lib NO_DEFAULT_PATH)
elseif(OPTION_STATIC)
find_path(ZLIB_INCLUDE_DIRS zlib.h)
find_library(ZLIB_LIBRARIES libz.a)
else()
include(FindZlib)
endif()
if(ZLIB_INCLUDE_DIRS AND ZLIB_LIBRARIES)
set(HAVE_ZLIB TRUE)
message(STATUS "Found Zlib: '${ZLIB_INCLUDE_DIRS}', '${ZLIB_LIBRARIES}'")
else()
set(HAVE_ZLIB FALSE)
message(FATAL_ERROR "Zlib not found")
endif()
include_directories(${ZLIB_INCLUDE_DIRS})
list(APPEND DEP_LIBS ${ZLIB_LIBRARIES})
endif(OPTION_USE_ZLIB)
####### Option: Build with iconv ##########
if(OPTION_USE_ICONV)
if(OPTION_MINGW)
find_path(ICONV_INCLUDE_DIRS iconv.h PATHS ${MINGWDIR}/include NO_DEFAULT_PATH)
find_library(ICONV_LIBRARIES libiconv.a PATHS ${MINGWDIR}/lib NO_DEFAULT_PATH)
elseif(OPTION_STATIC)
find_path(ICONV_INCLUDE_DIRS iconv.h)
find_library(ICONV_LIBRARIES libiconv.a)
else()
find_path(ICONV_INCLUDE_DIRS iconv.h)
find_library(ICONV_LIBRARIES NAMES iconv)
endif()
if(ICONV_INCLUDE_DIRS AND ICONV_LIBRARIES)
set(HAVE_ICONV TRUE)
message(STATUS "Found Libiconv: '${ICONV_INCLUDE_DIRS}', '${ICONV_LIBRARIES}'")
else()
set(HAVE_ICONV FALSE)
message(FATAL_ERROR "Libiconv not found")
endif()
include_directories(${ICONV_INCLUDE_DIRS})
list(APPEND DEP_LIBS ${ICONV_LIBRARIES})
endif(OPTION_USE_ICONV)
####### Option: Build with VTK ##########
if(OPTION_VTK)
add_definitions(-DHAVE_VTK)
find_package(VTK REQUIRED)
if(VTK_FOUND)
message(STATUS "Found VTK: '${VTK_INCLUDE_DIRS}'")
else()
message(FATAL_ERROR "VTK not found")
endif()
include_directories(${VTK_INCLUDE_DIRS})
list(APPEND SRC_FILES source/vtk/vtkwrapper.cpp)
list(APPEND HEADER_FILES source/vtk/vtkwrapper.h)
add_definitions("-Wno-deprecated")
list(APPEND DEP_LIBS ${VTK_LIBRARIES})
endif(OPTION_VTK)
####### Option: Build with NextSubvolume ##########
if(OPTION_NSV)
#add_subdirectory(source/NextSubVolume)
#list(APPEND DEP_LIBS nsv)
#include_directories(source/NextSubVolume)
#include_directories(${VTK_INCLUDE_DIRS})
if(OPTION_MINGW)
find_path(SIGNAL_H_DIR signal.h PATHS ${MINGWDIR}/include NO_DEFAULT_PATH)
if(SIGNAL_H_DIR)
message(STATUS "Found signal.h: '${SIGNAL_H_DIR}'")
else()
message(FATAL_ERROR "signal.h not found")
endif()
include_directories(${SIGNAL_H_DIR})
endif()
list(APPEND SRC_FILES
source/NextSubVolume/StructuredGrid.cpp
source/NextSubVolume/Species.cpp
source/NextSubVolume/ReactionEquation.cpp
source/NextSubVolume/NextSubvolumeMethod.cpp
source/NextSubVolume/Kairos.cpp
source/NextSubVolume/Io.cpp
source/NextSubVolume/Geometry.cpp
source/NextSubVolume/nsvc.cpp
)
list(APPEND HEADER_FILES
source/NextSubVolume/Vector.h
source/NextSubVolume/StructuredGrid.h
source/NextSubVolume/Species.h
source/NextSubVolume/ReactionEquation.h
source/NextSubVolume/NextSubvolumeMethod.h
source/NextSubVolume/Log.h
source/NextSubVolume/Kairos.h
source/NextSubVolume/Io.h
source/NextSubVolume/Geometry.h
source/NextSubVolume/Constants.h
source/NextSubVolume/nsvc.h
)
add_definitions("-Wno-deprecated")
endif(OPTION_NSV)
####### Option: Build with PDE ##########
####### Targets ##########
if(OPTION_OPENMP)
find_package(OpenMP)
if (OPENMP_FOUND)
set (CMAKE_CXX_FLAGS "$ENV{CFLAGS} ${OpenMP_CXX_FLAGS} $ENV{glib_CFLAGS} $ENV{gsl_CFLAGS} $ENV{glib_LIBS} $ENV{gsl_LIBS} -g -std=c++11")
message(CMAKE_C_FLAGS " ${CMAKE_C_FLAGS}")
message(CMAKE_CXX_FLAGS " ${CMAKE_CXX_FLAGS}")
endif(OPENMP_FOUND)
else(OPTION_OPENMP)
set (CMAKE_CXX_FLAGS "$ENV{CFLAGS} $ENV{glib_CFLAGS} $ENV{gsl_CFLAGS} $ENV{glib_LIBS} $ENV{gsl_LIBS} -g -std=c++11")
message(CMAKE_C_FLAGS " ${CMAKE_C_FLAGS}")
message(CMAKE_CXX_FLAGS " ${CMAKE_CXX_FLAGS}")
endif(OPTION_OPENMP)
if(OPTION_TARGET_SMOLDYN)
add_executable(smoldyn-cplx5 ${SRC_FILES} ${MAIN_FILES} ${HEADER_FILES})
target_link_libraries(smoldyn-cplx5 ${DEP_LIBS})
message(DEP_LIBS, " ${DEP_LIBS}")
#SET_TARGET_PROPERTIES(smoldyn-cplx PROPERTIES COMPILE_FLAGS "-fopenmp")
endif()
if(OPTION_TARGET_LIBSMOLDYN)
add_library(smoldyn_shared SHARED ${SRC_FILES} ${HEADER_FILES})
add_library(smoldyn_static STATIC ${SRC_FILES} ${HEADER_FILES})
target_link_libraries(smoldyn_shared ${DEP_LIBS})
target_link_libraries(smoldyn_static ${DEP_LIBS})
if(APPLE)
SET_TARGET_PROPERTIES(smoldyn_shared PROPERTIES LINK_FLAGS "-framework Glut -framework OpenGL")
endif(APPLE)
endif(OPTION_TARGET_LIBSMOLDYN)
########## install ###########
if(NOT OPTION_MINGW)
if(OPTION_TARGET_SMOLDYN)
install(TARGETS smoldyn-cplx5 RUNTIME DESTINATION bin)
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)
endif(OPTION_TARGET_LIBSMOLDYN)
endif(NOT OPTION_MINGW)
########## configure file #########
configure_file (
${CMAKE_CURRENT_SOURCE_DIR}/source/smoldynconfigure.h.in
${CMAKE_CURRENT_BINARY_DIR}/smoldynconfigure.h
)
########## package #########
include(CPack)