Changeset 14496


Ignore:
Timestamp:
Apr 14, 2015, 10:46:40 PM (6 years ago)
Author:
mikedld
Message:

Add version info to executables (on Windows). Group projects into folders (CMake).

Location:
trunk
Files:
1 added
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/CMakeLists.txt

    r14484 r14496  
    9393endif()
    9494
     95set_property(GLOBAL PROPERTY USE_FOLDERS ON)
     96
    9597set(CURL_MINIMUM            7.15.4)
    9698set(EVENT2_MINIMUM          2.0.10)
  • trunk/cli/CMakeLists.txt

    r14350 r14496  
    33include_directories(${CMAKE_SOURCE_DIR})
    44
    5 add_executable(${TR_NAME}-cli cli.c)
     5tr_win32_app_info(${PROJECT_NAME}_WIN32_RC_FILE
     6    "Transmission Utility ('cli', obsolete)"
     7    "${TR_NAME}-cli"
     8    "${TR_NAME}-cli.exe")
     9
     10add_executable(${TR_NAME}-cli cli.c ${${PROJECT_NAME}_WIN32_RC_FILE})
    611include_directories(${TR_NAME}-cli ${CURL_INCLUDE_DIRS})
    712target_link_libraries(${TR_NAME}-cli ${TR_NAME})
  • trunk/cmake/TrMacros.cmake

    r14436 r14496  
    105105        )
    106106
     107        set_property(TARGET ${${ID}_UPSTREAM_TARGET} PROPERTY FOLDER "ThirdParty")
     108
    107109        set(${ID}_INCLUDE_DIR "${${ID}_PREFIX}/include" CACHE INTERNAL "")
    108110        set(${ID}_LIBRARY "${${ID}_PREFIX}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}${LIBNAME}${CMAKE_STATIC_LIBRARY_SUFFIX}" CACHE INTERNAL "")
     
    120122    set_target_properties(${TGT} PROPERTIES ${PROP} "${VAL}")
    121123endfunction()
     124
     125function(tr_win32_app_info OVAR DESCR INTNAME ORIGFNAME)
     126    if(NOT WIN32)
     127        return()
     128    endif()
     129
     130    set(TR_FILE_DESCRIPTION "${DESCR}")
     131    set(TR_INTERNAL_NAME "${INTNAME}")
     132    set(TR_ORIGINAL_FILENAME "${ORIGFNAME}")
     133    if(ARGN)
     134        set(TR_MAIN_ICON "${ARGN}")
     135    endif()
     136
     137    configure_file("${CMAKE_SOURCE_DIR}/cmake/Transmission.rc.in" "${INTNAME}.rc")
     138
     139    set(${OVAR} "${CMAKE_CURRENT_BINARY_DIR}/${INTNAME}.rc" PARENT_SCOPE)
     140endfunction()
  • trunk/daemon/CMakeLists.txt

    r14485 r14496  
    3535)
    3636
    37 add_executable(${TR_NAME}-daemon ${${PROJECT_NAME}_SOURCES} ${${PROJECT_NAME}_HEADERS})
     37tr_win32_app_info(${PROJECT_NAME}_WIN32_RC_FILE
     38    "Transmission Daemon"
     39    "${TR_NAME}-daemon"
     40    "${TR_NAME}-daemon.exe")
     41
     42add_executable(${TR_NAME}-daemon
     43    ${${PROJECT_NAME}_SOURCES}
     44    ${${PROJECT_NAME}_HEADERS}
     45    ${${PROJECT_NAME}_WIN32_RC_FILE})
    3846
    3947set_target_properties(${TR_NAME}-daemon PROPERTIES
     
    4755)
    4856
    49 add_executable(${TR_NAME}-remote remote.c)
     57tr_win32_app_info(${PROJECT_NAME}_remote_WIN32_RC_FILE
     58    "Transmission Utility ('remote')"
     59    "${TR_NAME}-remote"
     60    "${TR_NAME}-remote.exe")
     61
     62add_executable(${TR_NAME}-remote remote.c ${${PROJECT_NAME}_remote_WIN32_RC_FILE})
    5063
    5164target_link_libraries(${TR_NAME}-remote
  • trunk/gtk/CMakeLists.txt

    r14432 r14496  
    136136)
    137137
     138tr_win32_app_info(${PROJECT_NAME}_WIN32_RC_FILE
     139    "Transmission GTK+ Client"
     140    "${TR_NAME}-gtk"
     141    "${TR_NAME}-gtk.exe"
     142    "${TR_NAME}.ico")
     143
    138144add_executable(${TR_NAME}-gtk WIN32
    139145    ${${PROJECT_NAME}_SOURCES}
    140146    ${${PROJECT_NAME}_HEADERS}
    141147    ${${PROJECT_NAME}_DESKTOP_FILE}
     148    ${${PROJECT_NAME}_WIN32_RC_FILE}
    142149)
    143150
  • trunk/libtransmission/CMakeLists.txt

    r14436 r14496  
    225225
    226226    target_link_libraries(${TR_NAME}-test ${TR_NAME})
     227    set_property(TARGET ${TR_NAME}-test PROPERTY FOLDER "UnitTests")
    227228
    228229    set(crypto-test_ADD_SOURCES crypto-test-ref.h)
     
    233234        target_link_libraries(${TP} ${TR_NAME} ${TR_NAME}-test)
    234235        add_test(${T} ${TP})
     236        set_property(TARGET ${TP} PROPERTY FOLDER "UnitTests")
    235237    endforeach()
    236238endif()
  • trunk/qt/CMakeLists.txt

    r14466 r14496  
    168168)
    169169
     170tr_win32_app_info(${PROJECT_NAME}_WIN32_RC_FILE
     171    "Transmission Qt Client"
     172    "transmission-qt"
     173    "transmission-qt.exe"
     174    "qtr.ico")
     175
    170176add_executable(${TR_NAME}-qt WIN32
    171177    ${${PROJECT_NAME}_SOURCES}
     
    174180    ${${PROJECT_NAME}_HEADERS}
    175181    ${${PROJECT_NAME}_QM_FILES}
     182    ${${PROJECT_NAME}_WIN32_RC_FILE}
    176183)
    177184
  • trunk/utils/CMakeLists.txt

    r14350 r14496  
    44
    55foreach(P create edit show)
    6     add_executable(${TR_NAME}-${P} ${P}.c)
     6    tr_win32_app_info(${PROJECT_NAME}_${P}_WIN32_RC_FILE
     7        "Transmission Utility ('${P}')"
     8        "${TR_NAME}-${P}"
     9        "${TR_NAME}-${P}.exe")
     10
     11    add_executable(${TR_NAME}-${P} ${P}.c ${${PROJECT_NAME}_${P}_WIN32_RC_FILE})
    712    include_directories(${TR_NAME}-${P} ${EVENT2_INCLUDE_DIRS} ${CURL_INCLUDE_DIRS})
    813    target_link_libraries(${TR_NAME}-${P} ${TR_NAME})
Note: See TracChangeset for help on using the changeset viewer.