Changeset 10788 for source


Ignore:
Timestamp:
Nov 14, 2012, 5:27:23 PM (12 years ago)
Author:
Michael Tänzer
Message:

CMake: Fix bug that caused the headers all to be installed flat (instead of a hierarchy)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • source/ariba/CMakeLists.txt

    r10700 r10788  
    138138
    139139
     140set(add_headers_INSTALL_DIR include/ariba/)
     141set(add_headers_INSTALL_COMPONENT Development)
    140142set(add_headers_VAR libariba_HEADERS)
    141143set(add_sources_VAR libariba_SOURCES)
     
    144146function(add_subdir_sources_helper subdir)
    145147    set(CURRENT_SOURCE_DIR "${CURRENT_SOURCE_DIR}${subdir}/")
     148    set(add_headers_INSTALL_DIR "${add_headers_INSTALL_DIR}${subdir}/")
    146149    add_subdirectory(${subdir})
    147150    set(${add_headers_VAR} ${${add_headers_VAR}} PARENT_SCOPE)
     
    161164        list(APPEND ${add_headers_VAR} "${CURRENT_SOURCE_DIR}${source}")
    162165    endforeach(source ${sources} ${ARGN})
     166   
     167    install(FILES ${sources} ${ARGN}
     168        DESTINATION "${add_headers_INSTALL_DIR}"
     169        COMPONENT "${add_headers_INSTALL_COMPONENT}"
     170        )
     171   
    163172    set(${add_headers_VAR} ${${add_headers_VAR}} PARENT_SCOPE)
    164173endmacro(add_headers sources)
     
    173182
    174183# Headers to be exported
    175 set(libariba_HEADERS
     184add_headers(
    176185    ariba.h
    177186    AribaModule.h
     
    189198    )
    190199
    191 set(libariba_SOURCES
     200add_sources(
    192201    AribaModule.cpp
    193202    CommunicationListener.cpp
     
    247256
    248257
    249 # Installation stuff
     258# Install binaries
    250259install(TARGETS ariba ${ariba_STATIC_TARGET} EXPORT ariba-targets
    251260    LIBRARY DESTINATION lib COMPONENT Runtime
     
    254263    )
    255264
    256 install(FILES ${libariba_HEADERS}
    257     DESTINATION include/ariba
    258     COMPONENT Development
    259     )
    260265
    261266# Make libariba usable from build tree
Note: See TracChangeset for help on using the changeset viewer.