diff --git a/definitions/CMakeLists.txt b/definitions/CMakeLists.txt index fd0e2376..64dca123 100644 --- a/definitions/CMakeLists.txt +++ b/definitions/CMakeLists.txt @@ -52,7 +52,7 @@ file(GLOB QA_INTERFACE_FILE ${WORKING_VARIABLE}) set(PUBLIC_HEADERS "definitions.h" "ValuePoint.h" "Module.h") if(NOT GENERATOR_SEARCH_PATH) - set(GENERATOR_SEARCH_PATH ${CMAKE_SYSROOT}${CMAKE_INSTALL_PREFIX}/include/${NAMESPACE}) + set(GENERATOR_SEARCH_PATH ${CMAKE_SYSROOT}${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}/${NAMESPACE}) endif() JsonGenerator(CODE INPUT ${JSON_FILE} OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/generated" INCLUDE_PATH ${GENERATOR_SEARCH_PATH} CPPIFDIR "${CMAKE_CURRENT_SOURCE_DIR}/../interfaces/") @@ -105,27 +105,27 @@ target_include_directories(${Target} PRIVATE $ $ - $ + $ ) install( TARGETS ${Target} EXPORT ${Target}Targets # for downstream dependencies - ARCHIVE DESTINATION lib/ COMPONENT libs # static lib - LIBRARY DESTINATION lib/ COMPONENT libs # shared lib - RUNTIME DESTINATION bin COMPONENT libs # binaries - FRAMEWORK DESTINATION bin/ COMPONENT libs # for mac - PUBLIC_HEADER DESTINATION include/${NAMESPACE}/definitions COMPONENT devel # headers for mac (note the different component -> different package) - INCLUDES DESTINATION include/${NAMESPACE} # default include path + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/ COMPONENT libs # static lib + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/ COMPONENT libs # shared lib + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT libs # binaries + FRAMEWORK DESTINATION ${CMAKE_INSTALL_BINDIR}/ COMPONENT libs # for mac + PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${NAMESPACE}/definitions COMPONENT devel # headers for mac (note the different component -> different package) + INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${NAMESPACE} # default include path ) install( FILES ${JSON_LINK_HEADERS} - DESTINATION include/${NAMESPACE}/interfaces/json + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${NAMESPACE}/interfaces/json ) install( FILES ${QA_JSON_LINK_HEADERS} - DESTINATION include/${NAMESPACE}/qa_interfaces/json + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${NAMESPACE}/qa_interfaces/json ) InstallPackageConfig( diff --git a/definitions/Definitions.vcxproj b/definitions/Definitions.vcxproj index 32820c98..2928d142 100644 --- a/definitions/Definitions.vcxproj +++ b/definitions/Definitions.vcxproj @@ -290,10 +290,10 @@ Document - + Document - + Document diff --git a/definitions/Definitions.vcxproj.filters b/definitions/Definitions.vcxproj.filters index d89dd695..56ddfb68 100644 --- a/definitions/Definitions.vcxproj.filters +++ b/definitions/Definitions.vcxproj.filters @@ -300,10 +300,10 @@ Contracts - + Contracts - + Contracts diff --git a/interfaces/CMakeLists.txt b/interfaces/CMakeLists.txt index 1649dd29..29ac8364 100644 --- a/interfaces/CMakeLists.txt +++ b/interfaces/CMakeLists.txt @@ -31,7 +31,7 @@ find_package(${NAMESPACE}COM REQUIRED) set(Target ${NAMESPACE}${PROJECT_NAME}) if(NOT GENERATOR_SEARCH_PATH) - set(GENERATOR_SEARCH_PATH ${CMAKE_SYSROOT}${CMAKE_INSTALL_PREFIX}/include/${NAMESPACE}) + set(GENERATOR_SEARCH_PATH ${CMAKE_SYSROOT}${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}/${NAMESPACE}) endif() separate_arguments(INTERFACES_PATTERNS) @@ -69,24 +69,24 @@ string(TOLOWER ${NAMESPACE} NAMESPACE_LIB) install( TARGETS ${Target} EXPORT ${Target}Targets # for downstream dependencies - LIBRARY DESTINATION lib/${NAMESPACE_LIB}/proxystubs COMPONENT libs # shared lib + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/${NAMESPACE_LIB}/proxystubs COMPONENT libs # shared lib ) install( FILES ${INTERFACES_HEADERS} - DESTINATION include/${NAMESPACE}/interfaces + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${NAMESPACE}/interfaces ) install( FILES ${JSON_HEADERS} - DESTINATION include/${NAMESPACE}/interfaces/json + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${NAMESPACE}/interfaces/json ) include(CreateLink) CreateLink( - LINK "${CMAKE_SYSROOT}${CMAKE_INSTALL_PREFIX}/include/cdmi.h" - TARGET "${CMAKE_SYSROOT}${CMAKE_INSTALL_PREFIX}/include/${NAMESPACE}/interfaces/IDRM.h" + LINK "${CMAKE_SYSROOT}${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}/cdmi.h" + TARGET "${CMAKE_SYSROOT}${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}/${NAMESPACE}/interfaces/IDRM.h" ) diff --git a/qa_interfaces/CMakeLists.txt b/qa_interfaces/CMakeLists.txt index c5a1fec4..794406e4 100644 --- a/qa_interfaces/CMakeLists.txt +++ b/qa_interfaces/CMakeLists.txt @@ -31,7 +31,7 @@ find_package(${NAMESPACE}COM REQUIRED) set(Target ${NAMESPACE}${PROJECT_NAME}) if(NOT GENERATOR_SEARCH_PATH) - set(GENERATOR_SEARCH_PATH ${CMAKE_SYSROOT}${CMAKE_INSTALL_PREFIX}/include/${NAMESPACE}) + set(GENERATOR_SEARCH_PATH ${CMAKE_SYSROOT}${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}/${NAMESPACE}) endif() separate_arguments(INTERFACES_PATTERNS) @@ -68,18 +68,10 @@ string(TOLOWER ${NAMESPACE} NAMESPACE_LIB) install( TARGETS ${Target} EXPORT ${Target}Targets # for downstream dependencies - LIBRARY DESTINATION lib/${NAMESPACE_LIB}/proxystubs COMPONENT libs # shared lib + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/${NAMESPACE_LIB}/proxystubs COMPONENT libs # shared lib ) install( FILES ${QA_INTERFACES_HEADERS} - DESTINATION include/${NAMESPACE}/qa_interfaces + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${NAMESPACE}/qa_interfaces ) - - - - - - - -