call resource compiler to include icon files into LAMMPS shell on Windows

This commit is contained in:
Axel Kohlmeyer 2020-10-23 20:06:21 -04:00
parent 3242cd5d31
commit c51d2a286a
No known key found for this signature in database
GPG Key ID: D9B44E93BF0C375A
4 changed files with 12 additions and 1 deletions

View File

@ -34,7 +34,16 @@ if(BUILD_LAMMPS_SHELL)
if(NOT LAMMPS_EXCEPTIONS)
message(WARNING "The LAMMPS shell needs LAMMPS_EXCEPTIONS enabled for full functionality")
endif()
add_executable(lammps-shell ${LAMMPS_TOOLS_DIR}/lammps-shell/lammps-shell.cpp)
# include resource compiler to embed icons into the executable on Windows
if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
enable_language(RC)
set(ICON_RC_FILE ${LAMMPS_TOOLS_DIR}/lammps-shell/lmpicons.rc)
endif()
add_executable(lammps-shell ${LAMMPS_TOOLS_DIR}/lammps-shell/lammps-shell.cpp ${ICON_RC_FILE})
target_include_directories(lammps-shell PRIVATE ${LAMMPS_TOOLS_DIR}/lammps-shell)
# workaround for broken readline pkg-config file on FreeBSD
if(CMAKE_SYSTEM_NAME STREQUAL FreeBSD)
target_include_directories(lammps-shell PRIVATE /usr/local/include)

Binary file not shown.

After

Width:  |  Height:  |  Size: 204 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 186 KiB

View File

@ -0,0 +1,2 @@
id1 ICON icons/lammps.ico
id2 ICON icons/lmpfile.ico