From a3985c340637af62324736c102a43b15ff0d12dc Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Thu, 15 Oct 2015 16:59:54 +0200 Subject: [PATCH] Add icon to examples --- examples/CMakeLists.txt | 24 +++++++++++++++++------- examples/glfw.icns | Bin 0 -> 27988 bytes examples/glfw.ico | Bin 0 -> 21630 bytes examples/glfw.rc | 3 +++ 4 files changed, 20 insertions(+), 7 deletions(-) create mode 100644 examples/glfw.icns create mode 100644 examples/glfw.ico create mode 100644 examples/glfw.rc diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index 9dec9abf..d9384430 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -11,6 +11,14 @@ endif() include_directories("${GLFW_SOURCE_DIR}/include" "${GLFW_SOURCE_DIR}/deps") +if (WIN32) + set(ICON glfw.rc) +elseif (APPLE) + set(ICON glfw.icns) + set_source_files_properties(glfw.icns PROPERTIES + MAXOSX_PACKAGE_LOCATION "Resources") +endif() + set(GLAD "${GLFW_SOURCE_DIR}/deps/glad/glad.h" "${GLFW_SOURCE_DIR}/deps/glad.c") set(GETOPT "${GLFW_SOURCE_DIR}/deps/getopt.h" @@ -18,13 +26,13 @@ set(GETOPT "${GLFW_SOURCE_DIR}/deps/getopt.h" set(TINYCTHREAD "${GLFW_SOURCE_DIR}/deps/tinycthread.h" "${GLFW_SOURCE_DIR}/deps/tinycthread.c") -add_executable(boing WIN32 MACOSX_BUNDLE boing.c ${GLAD}) -add_executable(gears WIN32 MACOSX_BUNDLE gears.c ${GLAD}) -add_executable(heightmap WIN32 MACOSX_BUNDLE heightmap.c ${GLAD}) -add_executable(particles WIN32 MACOSX_BUNDLE particles.c ${TINYCTHREAD} ${GETOPT} ${GLAD}) -add_executable(simple WIN32 MACOSX_BUNDLE simple.c ${GLAD}) -add_executable(splitview WIN32 MACOSX_BUNDLE splitview.c ${GLAD}) -add_executable(wave WIN32 MACOSX_BUNDLE wave.c ${GLAD}) +add_executable(boing WIN32 MACOSX_BUNDLE boing.c ${ICON} ${GLAD}) +add_executable(gears WIN32 MACOSX_BUNDLE gears.c ${ICON} ${GLAD}) +add_executable(heightmap WIN32 MACOSX_BUNDLE heightmap.c ${ICON} ${GLAD}) +add_executable(particles WIN32 MACOSX_BUNDLE particles.c ${ICON} ${TINYCTHREAD} ${GETOPT} ${GLAD}) +add_executable(simple WIN32 MACOSX_BUNDLE simple.c ${ICON} ${GLAD}) +add_executable(splitview WIN32 MACOSX_BUNDLE splitview.c ${ICON} ${GLAD}) +add_executable(wave WIN32 MACOSX_BUNDLE wave.c ${ICON} ${GLAD}) target_link_libraries(particles "${CMAKE_THREAD_LIBS_INIT}" "${RT_LIBRARY}") @@ -48,8 +56,10 @@ if (APPLE) set_target_properties(wave PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME "Wave") set_target_properties(${WINDOWS_BINARIES} PROPERTIES + RESOURCE glfw.icns MACOSX_BUNDLE_SHORT_VERSION_STRING ${GLFW_VERSION} MACOSX_BUNDLE_LONG_VERSION_STRING ${GLFW_VERSION_FULL} + MACOSX_BUNDLE_ICON_FILE glfw.icns MACOSX_BUNDLE_INFO_PLIST "${GLFW_SOURCE_DIR}/CMake/MacOSXBundleInfo.plist.in") endif() diff --git a/examples/glfw.icns b/examples/glfw.icns new file mode 100644 index 0000000000000000000000000000000000000000..ad98f39752132003199572e951ee6d99dcceb823 GIT binary patch literal 27988 zcmeI)`CC(08VB%`#c-tog0dGS$YQIq6hwk$35!Z9A`(Q9U6h)#FKSo{0YP8@6^j%V z8`?nysw^TF5FrS~TD2gHRA@m>5d~SpXp|zo$qdiKbpC-(dAUE_b9nB_C7MLj z=W+tWq7e#pbK7Z8M+iA`qD@Wkvr;r8G#DWQ#tD)386na>8RNuA`Xow>w9mvifyNAk zWKZB{3xw3?7sk)e&Cbp9W_k12EVl4k^Gp0^!E%0X@iBorEj}i2v&F{*wqU=+`QYt? zz>*eNsJ(c7MvE)RQfnvwsbVg!o`3&#@}Jg+#cRdiznzRNB#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X@ M%pLDj?WqX;0VcM~e*gdg literal 0 HcmV?d00001 diff --git a/examples/glfw.ico b/examples/glfw.ico new file mode 100644 index 0000000000000000000000000000000000000000..882a66051e351ce313238ca673bd11812ea77fd6 GIT binary patch literal 21630 zcmeI4ze{9S6vvOrWSIpM)N!y z<+8}P+}hln`D-FC-W7TBWbpUj7WsKYeVrJ|vn7$wJ{0ah_`kd*^3_M`YyMbXjzzxs zShqLC_aBKo`oy+R{5_E`Keg?TW&a(K)z3wqaqkHbqQ0lB8Ps-flqT^L3WNfoKqwFj zgaV;JC=d#S0t=$Ry@p`E6WXV2!XCWoQ{Kn%V?ho_Jj_ra6bJ=Eflwe62n9lcP#_ct z1ww&PAQT7%LV-{q6bJ=Eflwe62n9lc1yR6X4-0>;3g~r8{RZX)-dv~TyPWsNf;=7L zVTJ;KsKC7!#9y1Z`#Kx-J5O(ILSKW*Fs35>$aFdw*4&h{voov)TK|#O^cJw_6ssR* z%70-yW9G?pk4neKfd}+ z&fC}hJn+*8-^lal-)p9fMk5)I$FjVIS8yk{RlC7;R+1}ok zot+)o-QAVFy*hj*Vor_b92+rLx~zP6sXYaXOi7Yh5{8DXkr3(Ed?qx&^sr{KnYTzfo?ECh60o# z4Rj|7GH?!;3VL2-wlA4=feH<@m<$CfG|=J_WGGOfffk$~LxBnn^g$%ZP@qBseP9VP z6sXXE9kA!zm%_S20~H`ah5{8Ds3-{vRA`_gCCE^qLIV{pL52bq8mO2FG8CxLfDKWL zR#Ey=S@Tyj)WSSuC{Uq+9*6`P3RGyI2PZ*>3JsPxSP3!|sL((UV1f({hYSTOG++bN!aNkH(149n3-kJc0xC3MN7TYR6sXXEowEz(p+JS#F+zb*U||*D zWb~jzKc{TM9xTc50cCpYbIO19dHl~lx7p`6i+gKvZ+)KmKF@rMduwrTeV+L~&wPt} zYjJOVp7}n{e2aT)ac_N|`99Bli+gKvZ+)KmKF@rMduwrTeV+L~&wPt}YjJOVp7}n{ ze2aT)ac_N|`99Bli+gKvZ+)K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