source: trunk/cppad_lib/CMakeLists.txt @ 3790

Last change on this file since 3790 was 3790, checked in by bradbell, 4 years ago

merge to branch: trunk
from repository: https://github.com/coin-or/CppAD
start hash code: 431e0a227dbfe6172d265d9d79a2b5b258c5bc18
end hash code: 1d6dc964379103ffc27725c649e22416e1cd233b

commit 1d6dc964379103ffc27725c649e22416e1cd233b
Author: Brad Bell <bradbell@…>
Date: Sat Feb 20 18:34:50 2016 -0700

  1. Fix version number on cppad_lib.so.
  2. Advance to cppad-20160220.
File size: 1.7 KB
Line 
1# $Id$
2# -----------------------------------------------------------------------------
3# CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-16 Bradley M. Bell
4#
5# CppAD is distributed under multiple licenses. This distribution is under
6# the terms of the
7#                     Eclipse Public License Version 1.0.
8#
9# A copy of this license is included in the COPYING file of this distribution.
10# Please visit http://www.coin-or.org/CppAD/ for information on other licenses.
11# -----------------------------------------------------------------------------
12# Build and install the cppad_lib shared library
13#
14# string(REGEX REPLACE <regular_expression>
15#        <replace_expression> <output variable>
16#        <input> [<input>...])
17#
18# (year - 2000) dot (remove leading 0 from mmdd) dot (release)
19# Note that the dot (release) is optional
20# Also name that when mmdd is 0000 get (year - 2000) dot dot (release)
21STRING(REGEX REPLACE
22        "20([0-9][0-9])0*([0-9]*)([.]?[0-9]*)"
23        "\\1.\\2\\3"
24        soversion
25        ${cppad_version}
26)
27# In case where mmdd is 0000, dot (release) is present. Convert to
28# (year - 2000) dot 0 dot (release)
29STRING(REGEX REPLACE
30        "([.][.])"
31        ".0."
32        soversion
33        ${soversion}
34)
35MESSAGE(STATUS "soversion=${soversion}")
36#
37#  add_library(<name> [STATIC | SHARED | MODULE] [EXCLUDE_FROM_ALL]
38#       source1 source2 ... sourceN)
39# )
40ADD_LIBRARY( cppad_lib SHARED
41        cppad_colpack.cpp
42)
43# set_target_properties(target1 target2 ...
44# PROPERTIES prop1 value1 prop2 value2 ...)
45SET_TARGET_PROPERTIES( cppad_lib PROPERTIES SOVERSION ${soversion} )
46#
47# install(TARGETS myExe mySharedLib myStaticLib
48#       RUNTIME DESTINATION bin
49#       LIBRARY DESTINATION lib
50#       ARCHIVE DESTINATION lib/static)
51INSTALL(TARGETS cppad_lib DESTINATION ${cppad_abs_libdir})
Note: See TracBrowser for help on using the repository browser.