]> gerrit.simantics Code Review - simantics/fmil.git/blob - org.simantics.fmil.core/native/FMILibrary/Config.cmake/fmiimport.cmake
Switch to full JavaSE-11+ compatibility
[simantics/fmil.git] / org.simantics.fmil.core / native / FMILibrary / Config.cmake / fmiimport.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 FMIIMPORTDIR)
15 set(FMIIMPORTDIR ${FMILIBRARYHOME}/src/Import)
16 include(jmutil)
17 include(fmixml)
18 include(fmicapi)
19
20 set(DOXYFILE_EXTRA_SOURCES "${DOXYFILE_EXTRA_SOURCES} \"${FMIIMPORTDIR}/include\"")
21
22 include_directories("${FMIIMPORTDIR}" "${FMIIMPORTDIR}/include" "${FMILIB_THIRDPARTYLIBS}/FMI/")
23 set(FMIIMPORT_LIBRARIES fmiimport)
24
25 set(FMIIMPORT_PUBHEADERS
26         include/FMI1/fmi1_import.h
27         include/FMI1/fmi1_import_capi.h
28         include/FMI1/fmi1_import_capabilities.h
29         include/FMI1/fmi1_import_cosim.h
30         include/FMI1/fmi1_import_type.h
31         include/FMI1/fmi1_import_unit.h
32         include/FMI1/fmi1_import_variable.h
33         include/FMI1/fmi1_import_variable_list.h
34         include/FMI1/fmi1_import_vendor_annotations.h
35         include/FMI1/fmi1_import_convenience.h
36
37         include/FMI2/fmi2_import.h
38         include/FMI2/fmi2_import_capi.h
39         include/FMI2/fmi2_import_type.h
40         include/FMI2/fmi2_import_unit.h
41         include/FMI2/fmi2_import_variable.h
42         include/FMI2/fmi2_import_variable_list.h
43         include/FMI2/fmi2_import_convenience.h
44
45         include/FMI/fmi_import_context.h
46         include/FMI/fmi_import_util.h
47  )
48                                                         
49 set(FMIIMPORT_PRIVHEADERS
50         src/FMI1/fmi1_import_impl.h
51         src/FMI1/fmi1_import_variable_list_impl.h
52
53         src/FMI2/fmi2_import_impl.h
54         src/FMI2/fmi2_import_variable_list_impl.h
55  )
56  
57 PREFIXLIST(FMIIMPORT_PRIVHEADERS ${FMIIMPORTDIR}/)
58 PREFIXLIST(FMIIMPORT_PUBHEADERS ${FMIIMPORTDIR}/)
59
60 set(FMIIMPORTHEADERS
61         ${FMIIMPORT_PUBHEADERS} ${FMIIMPORT_PRIVHEADERS}
62  )
63
64 set(FMIIMPORTSOURCE
65         src/FMI/fmi_import_context.c
66         src/FMI/fmi_import_util.c
67         
68         src/FMI1/fmi1_import_cosim.c
69         src/FMI1/fmi1_import_capi.c
70         src/FMI1/fmi1_import_type.c
71         src/FMI1/fmi1_import_unit.c
72         src/FMI1/fmi1_import_variable.c
73         src/FMI1/fmi1_import_variable_list.c
74         src/FMI1/fmi1_import_vendor_annotations.c
75         src/FMI1/fmi1_import.c
76         src/FMI1/fmi1_import_capabilities.c
77         src/FMI1/fmi1_import_convenience.c
78
79         src/FMI2/fmi2_import_capi.c
80         src/FMI2/fmi2_import_type.c
81         src/FMI2/fmi2_import_unit.c
82         src/FMI2/fmi2_import_variable.c
83         src/FMI2/fmi2_import_variable_list.c
84         src/FMI2/fmi2_import.c
85         src/FMI2/fmi2_import_convenience.c
86         )
87
88 PREFIXLIST(FMIIMPORTSOURCE  ${FMIIMPORTDIR}/)
89
90 add_library(fmiimport ${FMILIBKIND} ${FMIIMPORTSOURCE} ${FMIIMPORTHEADERS})
91 target_link_libraries(fmiimport ${JMUTIL_LIBRARIES} ${FMIXML_LIBRARIES} ${FMIZIP_LIBRARIES} ${FMICAPI_LIBRARIES})
92 #target_link_libraries(fmiimportshared fmiimport)
93
94 #add_library(fmiimport_shared SHARED ${FMIIMPORTSOURCE} ${FMIIMPORTHEADERS} )
95 #target_link_libraries(fmiimport_shared fmiimport ${JMUTIL_LIBRARIES} ${FMIXML_LIBRARIES} ${FMIZIP_LIBRARIES} ${FMICAPI_LIBRARIES})
96 #install(TARGETS fmiimport_shared
97 #       ARCHIVE DESTINATION lib
98 #       LIBRARY DESTINATION lib
99 #       RUNTIME DESTINATION lib
100 #)
101 endif(NOT FMIIMPORTDIR)