| 1 |
# |
| 2 |
# %injeqt copyright begin% |
| 3 |
# Copyright 2014 Rafał Malinowski ([email protected]) |
| 4 |
# %injeqt copyright end% |
| 5 |
# |
| 6 |
# This library is free software; you can redistribute it and/or |
| 7 |
# modify it under the terms of the GNU Lesser General Public |
| 8 |
# License as published by the Free Software Foundation; either |
| 9 |
# version 2.1 of the License, or (at your option) any later version. |
| 10 |
# |
| 11 |
# This library is distributed in the hope that it will be useful, |
| 12 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 14 |
# Lesser General Public License for more details. |
| 15 |
# |
| 16 |
# You should have received a copy of the GNU Lesser General Public |
| 17 |
# License along with this library; if not, write to the Free Software |
| 18 |
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
| 19 |
# |
| 20 |
|
| 21 |
set (INJEQT_SRCS |
| 22 |
injector.cpp |
| 23 |
module.cpp |
| 24 |
type.cpp |
| 25 |
|
| 26 |
exception/ambiguous-types.cpp |
| 27 |
exception/default-constructor-not-found.cpp |
| 28 |
exception/dependency-duplicated.cpp |
| 29 |
exception/dependency-on-self.cpp |
| 30 |
exception/dependency-on-subtype.cpp |
| 31 |
exception/dependency-on-supertype.cpp |
| 32 |
exception/empty-type.cpp |
| 33 |
exception/exception.cpp |
| 34 |
exception/instantiation-failed.cpp |
| 35 |
exception/interface-not-implemented.cpp |
| 36 |
exception/invalid-action.cpp |
| 37 |
exception/invalid-dependency.cpp |
| 38 |
exception/invalid-qobject.cpp |
| 39 |
exception/invalid-setter.cpp |
| 40 |
exception/qobject-type.cpp |
| 41 |
exception/unavailable-required-types.cpp |
| 42 |
exception/unknown-type.cpp |
| 43 |
exception/unique-factory-method-not-found.cpp |
| 44 |
exception/unresolvable-dependencies.cpp |
| 45 |
|
| 46 |
internal/action-method.cpp |
| 47 |
internal/default-constructor-method.cpp |
| 48 |
internal/dependencies.cpp |
| 49 |
internal/dependency.cpp |
| 50 |
internal/factory-method.cpp |
| 51 |
internal/implementation.cpp |
| 52 |
internal/implemented-by.cpp |
| 53 |
internal/injector-core.cpp |
| 54 |
internal/injector-impl.cpp |
| 55 |
internal/interfaces-utils.cpp |
| 56 |
internal/module-impl.cpp |
| 57 |
internal/provided-object.cpp |
| 58 |
internal/provider-by-default-constructor.cpp |
| 59 |
internal/provider-by-default-constructor-configuration.cpp |
| 60 |
internal/provider-by-factory.cpp |
| 61 |
internal/provider-by-factory-configuration.cpp |
| 62 |
internal/provider-by-parent-injector.cpp |
| 63 |
internal/provider-by-parent-injector-configuration.cpp |
| 64 |
internal/provider-ready.cpp |
| 65 |
internal/provider-ready-configuration.cpp |
| 66 |
internal/required-to-satisfy.cpp |
| 67 |
internal/resolved-dependency.cpp |
| 68 |
internal/resolve-dependencies.cpp |
| 69 |
internal/setter-method.cpp |
| 70 |
internal/type-dependencies.cpp |
| 71 |
internal/type-relations.cpp |
| 72 |
internal/type-role.cpp |
| 73 |
internal/types-by-name.cpp |
| 74 |
internal/types-model.cpp |
| 75 |
) |
| 76 |
|
| 77 |
add_definitions (-Dinjeqt_EXPORTS) |
| 78 |
if (NOT CMAKE_BUILD_TYPE MATCHES RELEASE AND NOT DISABLE_TESTS) |
| 79 |
add_definitions (-Dinjeqt_INTERNAL_EXPORTS) |
| 80 |
|
| 81 |
if (NOT DISABLE_COVERAGE) |
| 82 |
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -fprofile-arcs -ftest-coverage -O0") |
| 83 |
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -fprofile-arcs -ftest-coverage -O0") |
| 84 |
set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fprofile-arcs -ftest-coverage -O0") |
| 85 |
endif (NOT DISABLE_COVERAGE) |
| 86 |
endif (NOT CMAKE_BUILD_TYPE MATCHES RELEASE AND NOT DISABLE_TESTS) |
| 87 |
|
| 88 |
add_library ( |
| 89 |
injeqt |
| 90 |
SHARED |
| 91 |
${INJEQT_SRCS} |
| 92 |
) |
| 93 |
|
| 94 |
qt5_use_modules (injeqt |
| 95 |
LINK_PUBLIC Core |
| 96 |
) |
| 97 |
|
| 98 |
set_target_properties (injeqt PROPERTIES |
| 99 |
SOVERSION "${INJEQT_SOVERSION}" |
| 100 |
VERSION "${INJEQT_VERSION}" |
| 101 |
) |
| 102 |
|
| 103 |
if (NOT WIN32) |
| 104 |
include (GNUInstallDirs) |
| 105 |
endif () |
| 106 |
|
| 107 |
install (TARGETS |
| 108 |
injeqt |
| 109 |
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} |
| 110 |
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} |
| 111 |
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} |
| 112 |
) |