set(TR_SCM_REVISION 0)
endif()
+set_property(GLOBAL PROPERTY USE_FOLDERS ON)
+
set(CURL_MINIMUM 7.15.4)
set(EVENT2_MINIMUM 2.0.10)
set(OPENSSL_MINIMUM 0.9.4)
include_directories(${CMAKE_SOURCE_DIR})
-add_executable(${TR_NAME}-cli cli.c)
+tr_win32_app_info(${PROJECT_NAME}_WIN32_RC_FILE
+ "Transmission Utility ('cli', obsolete)"
+ "${TR_NAME}-cli"
+ "${TR_NAME}-cli.exe")
+
+add_executable(${TR_NAME}-cli cli.c ${${PROJECT_NAME}_WIN32_RC_FILE})
include_directories(${TR_NAME}-cli ${CURL_INCLUDE_DIRS})
target_link_libraries(${TR_NAME}-cli ${TR_NAME})
"-DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>"
)
+ set_property(TARGET ${${ID}_UPSTREAM_TARGET} PROPERTY FOLDER "ThirdParty")
+
set(${ID}_INCLUDE_DIR "${${ID}_PREFIX}/include" CACHE INTERNAL "")
set(${ID}_LIBRARY "${${ID}_PREFIX}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}${LIBNAME}${CMAKE_STATIC_LIBRARY_SUFFIX}" CACHE INTERNAL "")
endif()
set_target_properties(${TGT} PROPERTIES ${PROP} "${VAL}")
endfunction()
+
+function(tr_win32_app_info OVAR DESCR INTNAME ORIGFNAME)
+ if(NOT WIN32)
+ return()
+ endif()
+
+ set(TR_FILE_DESCRIPTION "${DESCR}")
+ set(TR_INTERNAL_NAME "${INTNAME}")
+ set(TR_ORIGINAL_FILENAME "${ORIGFNAME}")
+ if(ARGN)
+ set(TR_MAIN_ICON "${ARGN}")
+ endif()
+
+ configure_file("${CMAKE_SOURCE_DIR}/cmake/Transmission.rc.in" "${INTNAME}.rc")
+
+ set(${OVAR} "${CMAKE_CURRENT_BINARY_DIR}/${INTNAME}.rc" PARENT_SCOPE)
+endfunction()
--- /dev/null
+#include "winresrc.h"
+#include <libtransmission/version.h>
+
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+
+#pragma code_page(1252)
+
+#ifdef TR_STABLE_RELEASE
+ #define TR_FF_PRERELEASE 0x0L
+#else
+ #define TR_FF_PRERELEASE VS_FF_PRERELEASE
+#endif
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION MAJOR_VERSION, MINOR_VERSION, 0, 0
+ PRODUCTVERSION MAJOR_VERSION, MINOR_VERSION, 0, 0
+ FILEFLAGSMASK VS_FF_DEBUG | TR_FF_PRERELEASE
+#ifdef _DEBUG
+ FILEFLAGS VS_FF_DEBUG | TR_FF_PRERELEASE
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS VOS_NT_WINDOWS32
+ FILETYPE VFT_APP
+ FILESUBTYPE VFT2_UNKNOWN
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "040904b0"
+ BEGIN
+ VALUE "CompanyName", "Transmission Project"
+ VALUE "FileDescription", "${TR_FILE_DESCRIPTION}"
+ VALUE "FileVersion", LONG_VERSION_STRING
+ VALUE "InternalName", "${TR_INTERNAL_NAME}"
+ VALUE "LegalCopyright", "2005-2015 Transmission Project"
+ VALUE "OriginalFilename", "${TR_ORIGINAL_FILENAME}"
+ VALUE "ProductName", "Transmission"
+ VALUE "ProductVersion", LONG_VERSION_STRING
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x0400, 1200
+ END
+END
+
+#cmakedefine TR_MAIN_ICON "${TR_MAIN_ICON}"
+
+#ifdef TR_MAIN_ICON
+MAINICON ICON TR_MAIN_ICON
+#endif
watch.h
)
-add_executable(${TR_NAME}-daemon ${${PROJECT_NAME}_SOURCES} ${${PROJECT_NAME}_HEADERS})
+tr_win32_app_info(${PROJECT_NAME}_WIN32_RC_FILE
+ "Transmission Daemon"
+ "${TR_NAME}-daemon"
+ "${TR_NAME}-daemon.exe")
+
+add_executable(${TR_NAME}-daemon
+ ${${PROJECT_NAME}_SOURCES}
+ ${${PROJECT_NAME}_HEADERS}
+ ${${PROJECT_NAME}_WIN32_RC_FILE})
set_target_properties(${TR_NAME}-daemon PROPERTIES
COMPILE_FLAGS "${SYSTEMD_DAEMON_CFLAGS}"
${EVENT2_LIBRARIES}
)
-add_executable(${TR_NAME}-remote remote.c)
+tr_win32_app_info(${PROJECT_NAME}_remote_WIN32_RC_FILE
+ "Transmission Utility ('remote')"
+ "${TR_NAME}-remote"
+ "${TR_NAME}-remote.exe")
+
+add_executable(${TR_NAME}-remote remote.c ${${PROJECT_NAME}_remote_WIN32_RC_FILE})
target_link_libraries(${TR_NAME}-remote
${TR_NAME}
${GTK_CFLAGS_OTHER}
)
+tr_win32_app_info(${PROJECT_NAME}_WIN32_RC_FILE
+ "Transmission GTK+ Client"
+ "${TR_NAME}-gtk"
+ "${TR_NAME}-gtk.exe"
+ "${TR_NAME}.ico")
+
add_executable(${TR_NAME}-gtk WIN32
${${PROJECT_NAME}_SOURCES}
${${PROJECT_NAME}_HEADERS}
${${PROJECT_NAME}_DESKTOP_FILE}
+ ${${PROJECT_NAME}_WIN32_RC_FILE}
)
target_link_libraries(${TR_NAME}-gtk
)
target_link_libraries(${TR_NAME}-test ${TR_NAME})
+ set_property(TARGET ${TR_NAME}-test PROPERTY FOLDER "UnitTests")
set(crypto-test_ADD_SOURCES crypto-test-ref.h)
add_executable(${TP} ${T}-test.c ${${T}-test_ADD_SOURCES})
target_link_libraries(${TP} ${TR_NAME} ${TR_NAME}-test)
add_test(${T} ${TP})
+ set_property(TARGET ${TP} PROPERTY FOLDER "UnitTests")
endforeach()
endif()
-DQT_NO_CAST_FROM_ASCII
)
+tr_win32_app_info(${PROJECT_NAME}_WIN32_RC_FILE
+ "Transmission Qt Client"
+ "transmission-qt"
+ "transmission-qt.exe"
+ "qtr.ico")
+
add_executable(${TR_NAME}-qt WIN32
${${PROJECT_NAME}_SOURCES}
${${PROJECT_NAME}_UI_SOURCES}
${${PROJECT_NAME}_QRC_SOURCES}
${${PROJECT_NAME}_HEADERS}
${${PROJECT_NAME}_QM_FILES}
+ ${${PROJECT_NAME}_WIN32_RC_FILE}
)
target_link_libraries(${TR_NAME}-qt
include_directories(${CMAKE_SOURCE_DIR})
foreach(P create edit show)
- add_executable(${TR_NAME}-${P} ${P}.c)
+ tr_win32_app_info(${PROJECT_NAME}_${P}_WIN32_RC_FILE
+ "Transmission Utility ('${P}')"
+ "${TR_NAME}-${P}"
+ "${TR_NAME}-${P}.exe")
+
+ add_executable(${TR_NAME}-${P} ${P}.c ${${PROJECT_NAME}_${P}_WIN32_RC_FILE})
include_directories(${TR_NAME}-${P} ${EVENT2_INCLUDE_DIRS} ${CURL_INCLUDE_DIRS})
target_link_libraries(${TR_NAME}-${P} ${TR_NAME})