mirror of
https://github.com/transmission/transmission.git
synced 2025-12-26 13:21:44 +00:00
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.
This commit is contained in:
@@ -20,13 +20,15 @@ include_directories(
|
||||
|
||||
set(${PROJECT_NAME}_SOURCES
|
||||
daemon.c
|
||||
daemon-posix.c
|
||||
daemon-win32.c
|
||||
watch.c
|
||||
)
|
||||
|
||||
if(WIN32)
|
||||
list(APPEND ${PROJECT_NAME}_SOURCES daemon-win32.c)
|
||||
set_source_files_properties(daemon-posix.c PROPERTIES HEADER_FILE_ONLY ON)
|
||||
else()
|
||||
list(APPEND ${PROJECT_NAME}_SOURCES daemon-posix.c)
|
||||
set_source_files_properties(daemon-win32.c PROPERTIES HEADER_FILE_ONLY ON)
|
||||
endif()
|
||||
|
||||
set(${PROJECT_NAME}_HEADERS
|
||||
|
||||
@@ -15,11 +15,15 @@ set(${PROJECT_NAME}_SOURCES
|
||||
ConvertUTF.c
|
||||
crypto.c
|
||||
crypto-utils.c
|
||||
crypto-utils-cyassl.c
|
||||
crypto-utils-fallback.c
|
||||
crypto-utils-${CRYPTO_PKG}.c
|
||||
crypto-utils-openssl.c
|
||||
crypto-utils-polarssl.c
|
||||
error.c
|
||||
fdlimit.c
|
||||
file.c
|
||||
file-posix.c
|
||||
file-win32.c
|
||||
handshake.c
|
||||
history.c
|
||||
inout.c
|
||||
@@ -51,6 +55,7 @@ set(${PROJECT_NAME}_SOURCES
|
||||
tr-getopt.c
|
||||
tr-lpd.c
|
||||
tr-udp.c
|
||||
tr-utp.c
|
||||
upnp.c
|
||||
utils.c
|
||||
variant-benc.c
|
||||
@@ -62,10 +67,17 @@ set(${PROJECT_NAME}_SOURCES
|
||||
wildmat.c
|
||||
)
|
||||
|
||||
set_source_files_properties(crypto-utils-fallback.c PROPERTIES HEADER_FILE_ONLY ON)
|
||||
foreach(CP cyassl openssl polarssl)
|
||||
if(NOT CP STREQUAL CRYPTO_PKG)
|
||||
set_source_files_properties(crypto-utils-${CP}.c PROPERTIES HEADER_FILE_ONLY ON)
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
if(WIN32)
|
||||
list(APPEND ${PROJECT_NAME}_SOURCES file-win32.c)
|
||||
set_source_files_properties(file-posix.c PROPERTIES HEADER_FILE_ONLY ON)
|
||||
else()
|
||||
list(APPEND ${PROJECT_NAME}_SOURCES file-posix.c)
|
||||
set_source_files_properties(file-win32.c PROPERTIES HEADER_FILE_ONLY ON)
|
||||
endif()
|
||||
|
||||
set(${PROJECT_NAME}_PUBLIC_HEADERS
|
||||
@@ -123,6 +135,7 @@ set(${PROJECT_NAME}_PRIVATE_HEADERS
|
||||
trevent.h
|
||||
tr-lpd.h
|
||||
tr-udp.h
|
||||
tr-utp.h
|
||||
upnp.h
|
||||
variant-common.h
|
||||
verify.h
|
||||
@@ -130,9 +143,8 @@ set(${PROJECT_NAME}_PRIVATE_HEADERS
|
||||
webseed.h
|
||||
)
|
||||
|
||||
if(ENABLE_UTP)
|
||||
list(APPEND ${PROJECT_NAME}_SOURCES tr-utp.c)
|
||||
list(APPEND ${PROJECT_NAME}_PRIVATE_HEADERS tr-utp.h)
|
||||
if(NOT ENABLE_UTP)
|
||||
set_source_files_properties(tr-utp.c PROPERTIES HEADER_FILE_ONLY ON)
|
||||
endif()
|
||||
|
||||
add_definitions(
|
||||
|
||||
Reference in New Issue
Block a user