]> granicus.if.org Git - transmission/commitdiff
Always add all source files to targets
authorMike Gelfand <mikedld@mikedld.com>
Tue, 29 Dec 2015 02:04:37 +0000 (02:04 +0000)
committerMike Gelfand <mikedld@mikedld.com>
Tue, 29 Dec 2015 02:04:37 +0000 (02:04 +0000)
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.

daemon/CMakeLists.txt
libtransmission/CMakeLists.txt

index ef586374c582f712391663710cae2a94ae9c8d1b..56b0d1fccbd04c901889257399c5b8996a0a69f1 100644 (file)
@@ -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
index 5e6856211862679d20f4e521f86bad562506f119..d8ef7f37d7b6b52b531b4fd6b0bf193c3ed795eb 100644 (file)
@@ -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(