]> gerrit.simantics Code Review - simantics/fmil.git/blob - org.simantics.fmil.core/native/FMILibrary/Config.cmake/jmutil.cmake
Add FMILibrary-2.0.3 to org.simantics.fmil.core\native.
[simantics/fmil.git] / org.simantics.fmil.core / native / FMILibrary / Config.cmake / jmutil.cmake
1 #    Copyright (C) 2012 Modelon AB
2
3 #    This program is free software: you can redistribute it and/or modify
4 #    it under the terms of the BSD style license.
5
6 # #    This program is distributed in the hope that it will be useful,
7 #    but WITHOUT ANY WARRANTY; without even the implied warranty of
8 #    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
9 #    FMILIB_License.txt file for more details.
10
11 #    You should have received a copy of the FMILIB_License.txt file
12 #    along with this program. If not, contact Modelon AB <http://www.modelon.com>.
13
14 if(NOT JMUTILDIR)
15     set(JMUTILDIR ${FMILIBRARYHOME}/src/Util/)
16     set(JMUTIL_LIBRARIES jmutils)
17     include_directories ("${JMUTILDIR}/include" "${FMILIB_FMI_STANDARD_HEADERS}")
18         set(DOXYFILE_EXTRA_SOURCES "${DOXYFILE_EXTRA_SOURCES} \"${JMUTILDIR}/include\"")
19
20 set(JMUTILSOURCE
21  JM/jm_callbacks.c
22  JM/jm_templates_inst.c
23  JM/jm_named_ptr.c
24  JM/jm_portability.c
25  FMI/fmi_version.c
26  FMI/fmi_util.c
27  
28  FMI1/fmi1_enums.c
29  FMI2/fmi2_enums.c
30 )
31
32 set(JMUTILHEADERS
33   JM/jm_callbacks.h
34   JM/jm_vector.h
35   JM/jm_vector_template.h
36   JM/jm_stack.h
37   JM/jm_types.h
38   JM/jm_named_ptr.h
39   JM/jm_string_set.h
40   JM/jm_portability.h
41   FMI/fmi_version.h
42   FMI/fmi_util.h
43
44   FMI1/fmi1_functions.h
45   FMI1/fmi1_types.h
46   FMI1/fmi1_enums.h
47
48   FMI2/fmi2_functions.h
49   FMI2/fmi2_types.h
50   FMI2/fmi2_enums.h
51   FMI2/fmi2_xml_callbacks.h
52 )
53
54 PREFIXLIST(JMUTILSOURCE  ${JMUTILDIR}/src/)
55 PREFIXLIST(JMUTILHEADERS ${JMUTILDIR}/include/)
56
57 add_library(jmutils ${FMILIBKIND} ${JMUTILSOURCE} ${JMUTILHEADERS})
58
59 if(CYGWIN) 
60 message("not tested")
61 endif(CYGWIN)
62
63 target_link_libraries(jmutils c99snprintf)
64
65 if(UNIX)
66     target_compile_definitions(jmutils PRIVATE -D_GNU_SOURCE)
67         target_link_libraries(jmutils dl)
68 endif(UNIX)
69 if(WIN32)
70         target_link_libraries(jmutils Shlwapi)
71 endif(WIN32)
72
73 endif(NOT JMUTILDIR)