1 | # Copyright (C) 2014 Modelon AB |
---|
2 | |
---|
3 | # This program is free software: you can redistribute it and/or modify |
---|
4 | # it under the terms of the GNU General Public License version 3 as published |
---|
5 | # by the Free Software Foundation, or optionally, under the terms of the |
---|
6 | # Common Public License version 1.0 as published by IBM. |
---|
7 | |
---|
8 | # This program is distributed in the hope that it will be useful, |
---|
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
11 | # GNU General Public License, or the Common Public License, for more details. |
---|
12 | |
---|
13 | # You should have received copies of the GNU General Public License |
---|
14 | # and the Common Public License along with this program. If not, |
---|
15 | # see <http://www.gnu.org/licenses/> or |
---|
16 | # <http://www.ibm.com/developerworks/library/os-cpl.html/> respectively. |
---|
17 | |
---|
18 | # NOTE: CMake 2.8.6 is required since this is the version used in development. |
---|
19 | # The script is KNOWN NOT TO WORK WITH 2.8.3 and below (ExternalProject |
---|
20 | # interface changes). CMake 2.8.4 and 2.8.5 are not tested. |
---|
21 | cmake_minimum_required (VERSION 2.8.6 FATAL_ERROR) |
---|
22 | |
---|
23 | set(FMI_MESources |
---|
24 | |
---|
25 | fmi1_functions.h |
---|
26 | fmi1_types.h |
---|
27 | |
---|
28 | fmiModelFunctions.h |
---|
29 | fmiModelTypes.h |
---|
30 | fmi1_me.h |
---|
31 | |
---|
32 | fmi1_me.c |
---|
33 | ) |
---|
34 | #Build fmi_me library |
---|
35 | add_library(fmi1_me STATIC ${FMI_MESources}) |
---|
36 | if(NOT MSVC) |
---|
37 | set_target_properties(fmi1_me PROPERTIES COMPILE_FLAGS "-Wall -g -std=c89 -pedantic -Werror -O2") |
---|
38 | endif() |
---|
39 | |
---|
40 | #Install the libraries |
---|
41 | if (NOT MSVC) |
---|
42 | install(TARGETS fmi1_me DESTINATION "${RTLIB_LIB_DIR}") |
---|
43 | endif() |
---|
44 | |
---|
45 | #Install header files |
---|
46 | install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/" |
---|
47 | DESTINATION "${RTLIB_INCLUDE_DIR}" |
---|
48 | FILES_MATCHING PATTERN "*.h") |
---|