1# Copyright (c) 2014-2015, Intel Corporation 2# All rights reserved. 3# 4# Redistribution and use in source and binary forms, with or without modification, 5# are permitted provided that the following conditions are met: 6# 7# 1. Redistributions of source code must retain the above copyright notice, this 8# list of conditions and the following disclaimer. 9# 10# 2. Redistributions in binary form must reproduce the above copyright notice, 11# this list of conditions and the following disclaimer in the documentation and/or 12# other materials provided with the distribution. 13# 14# 3. Neither the name of the copyright holder nor the names of its contributors 15# may be used to endorse or promote products derived from this software without 16# specific prior written permission. 17# 18# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 19# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 20# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 21# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR 22# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 23# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 24# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 25# ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 29if(WIN32) 30 set(parameter_RESOURCE_FILE "${CMAKE_CURRENT_BINARY_DIR}/Resource.rc") 31 set(parameter_OS_SPECIFIC_SRCS ${parameter_RESOURCE_FILE}) 32endif() 33 34add_library(parameter SHARED 35 ${parameter_OS_SPECIFIC_SRCS} 36 AreaConfiguration.cpp 37 ArrayParameter.cpp 38 BaseParameter.cpp 39 BitParameterBlock.cpp 40 BitParameterBlockType.cpp 41 BitParameter.cpp 42 BitParameterType.cpp 43 BitwiseAreaConfiguration.cpp 44 BooleanParameterType.cpp 45 CommandHandlerWrapper.cpp 46 ComponentInstance.cpp 47 ComponentLibrary.cpp 48 ComponentType.cpp 49 CompoundRule.cpp 50 ConfigurableDomain.cpp 51 ConfigurableDomains.cpp 52 ConfigurableElementAggregator.cpp 53 ConfigurableElement.cpp 54 ConfigurationAccessContext.cpp 55 DomainConfiguration.cpp 56 Element.cpp 57 ElementLibrary.cpp 58 ElementLibrarySet.cpp 59 ElementLocator.cpp 60 EnumParameterType.cpp 61 EnumValuePair.cpp 62 FixedPointParameterType.cpp 63 FloatingPointParameterType.cpp 64 FormattedSubsystemObject.cpp 65 FrameworkConfigurationLocation.cpp 66 HardwareBackSynchronizer.cpp 67 InstanceConfigurableElement.cpp 68 InstanceDefinition.cpp 69 IntegerParameterType.cpp 70 LinearParameterAdaptation.cpp 71 LogarithmicParameterAdaptation.cpp 72 LoggingElementBuilderTemplate.cpp 73 MappingContext.cpp 74 MappingData.cpp 75 ParameterAccessContext.cpp 76 ParameterAdaptation.cpp 77 ParameterBlackboard.cpp 78 ParameterBlockType.cpp 79 Parameter.cpp 80 ParameterFrameworkConfiguration.cpp 81 ElementHandle.cpp 82 ParameterMgr.cpp 83 ParameterMgrFullConnector.cpp 84 ParameterMgrPlatformConnector.cpp 85 ParameterType.cpp 86 PathNavigator.cpp 87 PluginLocation.cpp 88 RuleParser.cpp 89 SelectionCriteria.cpp 90 SelectionCriteriaDefinition.cpp 91 SelectionCriterion.cpp 92 SelectionCriterionLibrary.cpp 93 SelectionCriterionRule.cpp 94 SelectionCriterionType.cpp 95 SimulatedBackSynchronizer.cpp 96 StringParameter.cpp 97 StringParameterType.cpp 98 Subsystem.cpp 99 SubsystemElementBuilder.cpp 100 SubsystemObject.cpp 101 SubsystemObjectCreator.cpp 102 SyncerSet.cpp 103 SystemClass.cpp 104 TypeElement.cpp 105 VirtualSubsystem.cpp 106 VirtualSyncer.cpp 107 XmlElementSerializingContext.cpp 108 XmlFileIncluderElement.cpp 109 XmlParameterSerializingContext.cpp) 110 111include(GenerateExportHeader) 112generate_export_header(parameter) 113 114if(WIN32) 115 set(WINRC_MAJOR ${PF_VERSION_MAJOR}) 116 set(WINRC_MINOR ${PF_VERSION_MINOR}) 117 set(WINRC_PATCH ${PF_VERSION_PATCH}) 118 set(WINRC_TWEAK ${PF_VERSION_TWEAK}) 119 target_compile_definitions(parameter PRIVATE 120 WINRC_DLL 121 WINRC_FILENAME="$<TARGET_FILE_NAME:parameter>") 122 set(WINRC_FILE_DESCRIPTION "Parameter Framework library") 123 configure_file("${PROJECT_SOURCE_DIR}/support/windows/Resource.rc.in" 124 "${parameter_RESOURCE_FILE}") 125endif() 126 127configure_file(version.h.in "${CMAKE_CURRENT_BINARY_DIR}/version.h") 128 129target_link_libraries(parameter 130 # Unfortunatly xmlSink and xmlSource need to be exposed to the plugins 131 PUBLIC xmlserializer 132 PRIVATE pfw_utility remote-processor 133 PRIVATE ${CMAKE_DL_LIBS}) 134 135target_include_directories(parameter 136 PUBLIC include log/include 137 # Export symbol macro header 138 PUBLIC "${CMAKE_CURRENT_BINARY_DIR}" 139 # FIXE: define . as an PUBLIC include directory only for plugins 140 PUBLIC .) 141 142install(TARGETS parameter LIBRARY DESTINATION lib RUNTIME DESTINATION bin ARCHIVE DESTINATION lib) 143# Client headers 144install(FILES 145 "${CMAKE_CURRENT_BINARY_DIR}/parameter_export.h" 146 include/CommandHandlerInterface.h 147 include/ElementHandle.h 148 include/ParameterHandle.h 149 include/ParameterMgrLoggerForward.h 150 include/ParameterMgrFullConnector.h 151 include/ParameterMgrPlatformConnector.h 152 include/SelectionCriterionInterface.h 153 include/SelectionCriterionTypeInterface.h 154 DESTINATION "include/parameter/client") 155# Core (plugin) headers 156install(FILES 157 "${CMAKE_CURRENT_BINARY_DIR}/parameter_export.h" 158 BitParameterBlockType.h 159 ConfigurableElement.h 160 DefaultElementLibrary.h 161 Element.h 162 ElementBuilder.h 163 ElementLibrary.h 164 FileIncluderElementBuilder.h 165 FormattedSubsystemObject.h 166 InstanceConfigurableElement.h 167 LoggingElementBuilderTemplate.h 168 Mapper.h 169 MappingContext.h 170 ParameterBlockType.h 171 ParameterType.h 172 PathNavigator.h 173 Plugin.h 174 Subsystem.h 175 SubsystemLibrary.h 176 SubsystemObject.h 177 SubsystemObjectCreator.h 178 SubsystemObjectFactory.h 179 Syncer.h 180 TypeElement.h 181 VirtualSubsystem.h 182 DESTINATION "include/parameter/plugin") 183install(DIRECTORY log/include/log/ 184 DESTINATION "include/parameter/plugin/log") 185