diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9893021ae..a9aee3b17 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -112,6 +112,7 @@ option (WSJT_TRACE_CAT_POLLS "Debugging option that turns on CAT diagnostics dur
option (WSJT_HAMLIB_TRACE "Debugging option that turns on full Hamlib internal diagnostics.")
option (WSJT_SOFT_KEYING "Apply a ramp to CW keying envelope to reduce transients." ON)
option (WSJT_SKIP_MANPAGES "Skip *nix manpage generation.")
+option (WSJT_EMBED_SAMPLES "Embed sample files into WSJT-X resources." ON)
CMAKE_DEPENDENT_OPTION (WSJT_QDEBUG_IN_RELEASE "Leave Qt debugging statements in Release configuration." OFF
"NOT is_debug_build" OFF)
@@ -382,6 +383,19 @@ set (all_C_and_CXXSRCS
${all_CXXSRCS}
)
+set (SAMPLE_FILES
+ samples/130418_1742.wav
+ samples/130610_2343.wav
+ )
+
+if (WSJT_EMBED_SAMPLES)
+ foreach (SAMPLE ${SAMPLE_FILES})
+ set (SAMPLE_PATHS "${SAMPLE_PATHS}\n ${CMAKE_SOURCE_DIR}/${SAMPLE}")
+ endforeach (SAMPLE ${SAMPLE_FILES})
+endif (WSJT_EMBED_SAMPLES)
+
+configure_file (wsjtx.qrc.in wsjtx.qrc @ONLY)
+
if (APPLE)
set (WSJTX_ICON_FILE ${CMAKE_PROJECT_NAME}.icns)
set (ICONSRCS
@@ -679,7 +693,7 @@ qt5_wrap_ui (wsjt_qt_GENUISRCS ${wsjt_qt_UISRCS})
qt5_wrap_ui (wsjtx_GENUISRCS ${wsjtx_UISRCS})
# Resource generation
-qt5_add_resources (wsjtx_RESOURCES_RCC wsjtx.qrc)
+qt5_add_resources (wsjtx_RESOURCES_RCC ${CMAKE_BINARY_DIR}/wsjtx.qrc)
# AX COM servers
if (WIN32)
diff --git a/wsjtx.qrc b/wsjtx.qrc
deleted file mode 100644
index 2638d3c2b..000000000
--- a/wsjtx.qrc
+++ /dev/null
@@ -1,39 +0,0 @@
-
-
- shortcuts.txt
- mouse_commands.txt
- prefixes.txt
- cty.dat
- kvasd.dat
- Palettes/Banana.pal
- Palettes/Blue1.pal
- Palettes/Blue2.pal
- Palettes/Blue3.pal
- Palettes/Brown.pal
- Palettes/Cyan1.pal
- Palettes/Cyan2.pal
- Palettes/Cyan3.pal
- Palettes/Default.pal
- Palettes/Digipan.pal
- Palettes/Fldigi.pal
- Palettes/Gray1.pal
- Palettes/Gray2.pal
- Palettes/Green1.pal
- Palettes/Green2.pal
- Palettes/Jungle.pal
- Palettes/Linrad.pal
- Palettes/Negative.pal
- Palettes/Orange.pal
- Palettes/Pink.pal
- Palettes/Rainbow.pal
- Palettes/Scope.pal
- Palettes/Sunburst.pal
- Palettes/VK4BDJ.pal
- Palettes/YL2KF.pal
- Palettes/Yellow1.pal
- Palettes/Yellow2.pal
- Palettes/ZL1FZ.pal
- samples/130418_1742.wav
- samples/130610_2343.wav
-
-
diff --git a/wsjtx.qrc.in b/wsjtx.qrc.in
new file mode 100644
index 000000000..0072c2ee5
--- /dev/null
+++ b/wsjtx.qrc.in
@@ -0,0 +1,38 @@
+
+
+ @CMAKE_SOURCE_DIR@/shortcuts.txt
+ @CMAKE_SOURCE_DIR@/mouse_commands.txt
+ @CMAKE_SOURCE_DIR@/prefixes.txt
+ @CMAKE_SOURCE_DIR@/cty.dat
+ @CMAKE_SOURCE_DIR@/kvasd.dat
+ @CMAKE_SOURCE_DIR@/Palettes/Banana.pal
+ @CMAKE_SOURCE_DIR@/Palettes/Blue1.pal
+ @CMAKE_SOURCE_DIR@/Palettes/Blue2.pal
+ @CMAKE_SOURCE_DIR@/Palettes/Blue3.pal
+ @CMAKE_SOURCE_DIR@/Palettes/Brown.pal
+ @CMAKE_SOURCE_DIR@/Palettes/Cyan1.pal
+ @CMAKE_SOURCE_DIR@/Palettes/Cyan2.pal
+ @CMAKE_SOURCE_DIR@/Palettes/Cyan3.pal
+ @CMAKE_SOURCE_DIR@/Palettes/Default.pal
+ @CMAKE_SOURCE_DIR@/Palettes/Digipan.pal
+ @CMAKE_SOURCE_DIR@/Palettes/Fldigi.pal
+ @CMAKE_SOURCE_DIR@/Palettes/Gray1.pal
+ @CMAKE_SOURCE_DIR@/Palettes/Gray2.pal
+ @CMAKE_SOURCE_DIR@/Palettes/Green1.pal
+ @CMAKE_SOURCE_DIR@/Palettes/Green2.pal
+ @CMAKE_SOURCE_DIR@/Palettes/Jungle.pal
+ @CMAKE_SOURCE_DIR@/Palettes/Linrad.pal
+ @CMAKE_SOURCE_DIR@/Palettes/Negative.pal
+ @CMAKE_SOURCE_DIR@/Palettes/Orange.pal
+ @CMAKE_SOURCE_DIR@/Palettes/Pink.pal
+ @CMAKE_SOURCE_DIR@/Palettes/Rainbow.pal
+ @CMAKE_SOURCE_DIR@/Palettes/Scope.pal
+ @CMAKE_SOURCE_DIR@/Palettes/Sunburst.pal
+ @CMAKE_SOURCE_DIR@/Palettes/VK4BDJ.pal
+ @CMAKE_SOURCE_DIR@/Palettes/YL2KF.pal
+ @CMAKE_SOURCE_DIR@/Palettes/Yellow1.pal
+ @CMAKE_SOURCE_DIR@/Palettes/Yellow2.pal
+ @CMAKE_SOURCE_DIR@/Palettes/ZL1FZ.pal
+ @SAMPLE_PATHS@
+
+