Changeset 14643


Ignore:
Timestamp:
Dec 29, 2015, 2:04:37 AM (7 years ago)
Author:
mikedld
Message:

Always add all source files to targets

Mark files which shouldn't be compiled as header-only, but still add
them as sources so that they are visible in e.g. MSVS project tree.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/daemon/CMakeLists.txt

    r14604 r14643  
    2121set(${PROJECT_NAME}_SOURCES
    2222    daemon.c
     23    daemon-posix.c
     24    daemon-win32.c
    2325    watch.c
    2426)
    2527
    2628if(WIN32)
    27     list(APPEND ${PROJECT_NAME}_SOURCES daemon-win32.c)
     29    set_source_files_properties(daemon-posix.c PROPERTIES HEADER_FILE_ONLY ON)
    2830else()
    29     list(APPEND ${PROJECT_NAME}_SOURCES daemon-posix.c)
     31    set_source_files_properties(daemon-win32.c PROPERTIES HEADER_FILE_ONLY ON)
    3032endif()
    3133
  • trunk/libtransmission/CMakeLists.txt

    r14496 r14643  
    1616    crypto.c
    1717    crypto-utils.c
     18    crypto-utils-cyassl.c
    1819    crypto-utils-fallback.c
    19     crypto-utils-${CRYPTO_PKG}.c
     20    crypto-utils-openssl.c
     21    crypto-utils-polarssl.c
    2022    error.c
    2123    fdlimit.c
    2224    file.c
     25    file-posix.c
     26    file-win32.c
    2327    handshake.c
    2428    history.c
     
    5256    tr-lpd.c
    5357    tr-udp.c
     58    tr-utp.c
    5459    upnp.c
    5560    utils.c
     
    6368)
    6469
     70set_source_files_properties(crypto-utils-fallback.c PROPERTIES HEADER_FILE_ONLY ON)
     71foreach(CP cyassl openssl polarssl)
     72    if(NOT CP STREQUAL CRYPTO_PKG)
     73        set_source_files_properties(crypto-utils-${CP}.c PROPERTIES HEADER_FILE_ONLY ON)
     74    endif()
     75endforeach()
     76
    6577if(WIN32)
    66     list(APPEND ${PROJECT_NAME}_SOURCES file-win32.c)
     78    set_source_files_properties(file-posix.c PROPERTIES HEADER_FILE_ONLY ON)
    6779else()
    68     list(APPEND ${PROJECT_NAME}_SOURCES file-posix.c)
     80    set_source_files_properties(file-win32.c PROPERTIES HEADER_FILE_ONLY ON)
    6981endif()
    7082
     
    124136    tr-lpd.h
    125137    tr-udp.h
     138    tr-utp.h
    126139    upnp.h
    127140    variant-common.h
     
    131144)
    132145
    133 if(ENABLE_UTP)
    134     list(APPEND ${PROJECT_NAME}_SOURCES tr-utp.c)
    135     list(APPEND ${PROJECT_NAME}_PRIVATE_HEADERS tr-utp.h)
     146if(NOT ENABLE_UTP)
     147    set_source_files_properties(tr-utp.c PROPERTIES HEADER_FILE_ONLY ON)
    136148endif()
    137149
Note: See TracChangeset for help on using the changeset viewer.