Skip to content

Commit

Permalink
add icon
Browse files Browse the repository at this point in the history
  • Loading branch information
dxli committed Sep 8, 2023
1 parent d4e8279 commit 0abc715
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
3 changes: 1 addition & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ endif()
set(FINAL_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}")

if(EXISTS "${CMAKE_SOURCE_DIR}/conan_toolchain.cmake")
#set(FINAL_INSTALL_DIR "${CMAKE_INSTALL_BINDIR}")
set(FINAL_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}")
set(CMAKE_INSTALL_BINDIR "bin")

Expand All @@ -42,7 +41,7 @@ if(EXISTS "${CMAKE_SOURCE_DIR}/conan_toolchain.cmake")
set(CPACK_SOURCE_INSTALLED_DIRECTORIES "${CMAKE_SOURCE_DIR}/build/bin;.")
set(CPACK_BUILD_SOURCE_DIRS "${CMAKE_SOURCE_DIR}/build/bin")

#SET(CPACK_NSIS_INSTALLED_ICON_NAME "${CMAKE_SOURCE_DIR}/build/bin/librecad.exe")
SET(CPACK_NSIS_INSTALLED_ICON_NAME "${CMAKE_SOURCE_DIR}/res/librecad.ico")
SET(CPACK_NSIS_PACKAGE_NAME "LibreCAD3")
set(CPACK_CREATE_DESKTOP_LINKS "LibreCAD3")
set(CPACK_PACKAGE_EXECUTABLES "librecad.exe;LibreCAD3")
Expand Down
7 changes: 6 additions & 1 deletion lcUI/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,12 @@ if(WITH_UNITTESTS)
target_link_libraries(lcui ${EXTRA_LIBS})
endif(WITH_UNITTESTS)

add_executable(librecad ${UI_srcs} ${UI_hdrs} ${UI_HEADERS} ${UI_RESOURCES})
if (MSVC)
add_executable(librecad ${UI_srcs} ${UI_hdrs} ${UI_HEADERS} ${UI_RESOURCES})
else()
set(UI_icon "${CMAKE_SOURCE_DIR}/res/librecad.rc")
add_executable(librecad ${UI_icon} ${UI_srcs} ${UI_hdrs} ${UI_HEADERS} ${UI_RESOURCES})
endif()

qt5_use_modules(librecad Core Gui Widgets OpenGL Svg)

Expand Down
Binary file added res/librecad.ico
Binary file not shown.
1 change: 1 addition & 0 deletions res/librecad.rc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ID1_ICON1 ICON DISCARDABLE "librecad.ico"

0 comments on commit 0abc715

Please sign in to comment.