1 # Copyright (C) 2012 Modelon AB
3 # This program is free software: you can redistribute it and/or modify
4 # it under the terms of the BSD style license.
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.
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>.
15 set(FMIIMPORTDIR ${FMILIBRARYHOME}/src/Import)
20 set(DOXYFILE_EXTRA_SOURCES "${DOXYFILE_EXTRA_SOURCES} \"${FMIIMPORTDIR}/include\"")
22 include_directories("${FMIIMPORTDIR}" "${FMIIMPORTDIR}/include" "${FMILIB_THIRDPARTYLIBS}/FMI/")
23 set(FMIIMPORT_LIBRARIES fmiimport)
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
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
45 include/FMI/fmi_import_context.h
46 include/FMI/fmi_import_util.h
49 set(FMIIMPORT_PRIVHEADERS
50 src/FMI1/fmi1_import_impl.h
51 src/FMI1/fmi1_import_variable_list_impl.h
53 src/FMI2/fmi2_import_impl.h
54 src/FMI2/fmi2_import_variable_list_impl.h
57 PREFIXLIST(FMIIMPORT_PRIVHEADERS ${FMIIMPORTDIR}/)
58 PREFIXLIST(FMIIMPORT_PUBHEADERS ${FMIIMPORTDIR}/)
61 ${FMIIMPORT_PUBHEADERS} ${FMIIMPORT_PRIVHEADERS}
65 src/FMI/fmi_import_context.c
66 src/FMI/fmi_import_util.c
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
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
88 PREFIXLIST(FMIIMPORTSOURCE ${FMIIMPORTDIR}/)
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)
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
101 endif(NOT FMIIMPORTDIR)