exe / shortcut icon, NSIS branding header

This commit is contained in:
Charles J. Cliffe 2015-03-05 21:02:38 -05:00
parent 78551d2a5a
commit b8fd786c47
3 changed files with 17 additions and 2 deletions

View File

@ -324,11 +324,24 @@ ELSE (MSVC)
) )
ENDIF(MSVC) ENDIF(MSVC)
set(RES_FILES "")
if(MINGW)
set(RES_FILES ${PROJECT_SOURCE_DIR}/cubicsdr.rc)
set(CMAKE_RC_COMPILER_INIT windres)
ENABLE_LANGUAGE(RC)
IF(EX_PLATFORM EQUAL 64)
SET(RC_TARGET "pe-x86-64")
ELSE(EX_PLATFORM EQUAL 64)
SET(RC_TARGET "pe-i386")
ENDIF(EX_PLATFORM EQUAL 64)
SET(CMAKE_RC_COMPILE_OBJECT "<CMAKE_RC_COMPILER> -O coff <DEFINES> -i <SOURCE> -o <OBJECT>")
endif(MINGW)
IF (NOT BUNDLE_APP) IF (NOT BUNDLE_APP)
configure_files(${PROJECT_SOURCE_DIR}/font ${CMAKE_BINARY_DIR}/${EX_PLATFORM_NAME} "*.fnt") configure_files(${PROJECT_SOURCE_DIR}/font ${CMAKE_BINARY_DIR}/${EX_PLATFORM_NAME} "*.fnt")
configure_files(${PROJECT_SOURCE_DIR}/font ${CMAKE_BINARY_DIR}/${EX_PLATFORM_NAME} "*.png") configure_files(${PROJECT_SOURCE_DIR}/font ${CMAKE_BINARY_DIR}/${EX_PLATFORM_NAME} "*.png")
add_executable(CubicSDR ${cubicsdr_sources} ${cubicsdr_headers}) add_executable(CubicSDR ${cubicsdr_sources} ${cubicsdr_headers} ${RES_FILES})
target_link_libraries(CubicSDR rtlsdr ${LIQUID_LIB} ${FFTW_LIB} ${wxWidgets_LIBRARIES} ${OPENGL_LIBRARIES} ${OTHER_LIBRARIES}) target_link_libraries(CubicSDR rtlsdr ${LIQUID_LIB} ${FFTW_LIB} ${wxWidgets_LIBRARIES} ${OPENGL_LIBRARIES} ${OTHER_LIBRARIES})
ENDIF (NOT BUNDLE_APP) ENDIF (NOT BUNDLE_APP)
@ -432,7 +445,7 @@ IF (WIN32 AND BUILD_INSTALLER)
set(CPACK_PACKAGE_INSTALL_DIRECTORY "CubicSDR") set(CPACK_PACKAGE_INSTALL_DIRECTORY "CubicSDR")
SET(CPACK_NSIS_INSTALLED_ICON_NAME "CubicSDR.ico") SET(CPACK_NSIS_INSTALLED_ICON_NAME "CubicSDR.ico")
SET(CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/LICENSE") SET(CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/LICENSE")
set(CPACK_PACKAGE_ICON "${PROJECT_SOURCE_DIR}/icon\\\\NSIS_Header.bmp")
IF(EX_PLATFORM EQUAL 64) IF(EX_PLATFORM EQUAL 64)
SET(CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES64") SET(CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES64")
SET(CPACK_NSIS_PACKAGE_NAME "${CPACK_PACKAGE_INSTALL_DIRECTORY}") SET(CPACK_NSIS_PACKAGE_NAME "${CPACK_PACKAGE_INSTALL_DIRECTORY}")
@ -484,5 +497,6 @@ IF (WIN32 AND BUILD_INSTALLER)
set(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "ExecWait '\\\"$INSTDIR\\\\vc_redist\\\\vcredist_${EX_PLATFORM_NAME}.exe\\\" /q:a'") set(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "ExecWait '\\\"$INSTDIR\\\\vc_redist\\\\vcredist_${EX_PLATFORM_NAME}.exe\\\" /q:a'")
ENDIF (MSVC) ENDIF (MSVC)
INCLUDE(CPack) INCLUDE(CPack)
ENDIF (WIN32 AND BUILD_INSTALLER) ENDIF (WIN32 AND BUILD_INSTALLER)

1
cubicsdr.rc Normal file
View File

@ -0,0 +1 @@
id ICON "icon/CubicSDR.ico"

BIN
icon/NSIS_Header.bmp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB