diff options
author | Nicholas Corgan <nick.corgan@ettus.com> | 2015-06-22 10:51:20 -0700 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2015-06-22 13:25:54 -0700 |
commit | 6b64d9bbc1aeed69f885fe342a37acd7610a705f (patch) | |
tree | cbba079749a2dc7caf9da594aed54636d08d99c8 | |
parent | 4dd2c9f462282f8e43da88219e52f76426d54e65 (diff) | |
download | uhd-6b64d9bbc1aeed69f885fe342a37acd7610a705f.tar.gz uhd-6b64d9bbc1aeed69f885fe342a37acd7610a705f.tar.bz2 uhd-6b64d9bbc1aeed69f885fe342a37acd7610a705f.zip |
cmake: allow for custom DLL resource file
* Use -DCUSTOM_RC_FILE=(filepath) option to use custom RC file
* Defaults to host/lib/uhd.rc.in if none specified
-rw-r--r-- | host/lib/CMakeLists.txt | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/host/lib/CMakeLists.txt b/host/lib/CMakeLists.txt index d8c6fad70..3fa8ed22f 100644 --- a/host/lib/CMakeLists.txt +++ b/host/lib/CMakeLists.txt @@ -103,8 +103,24 @@ IF(MSVC) IF(UHD_VERSION_DEVEL) SET(RC_TRIMMED_VERSION_PATCH "999") ENDIF(UHD_VERSION_DEVEL) + + # Allow a custom .rc template file to be used + IF(CUSTOM_RC_FILE) + IF(IS_ABSOLUTE "${CUSTOM_RC_FILE}") + SET(UHD_RC_IN "${CUSTOM_RC_FILE}") + ELSE() + SET(UHD_RC_IN "${CMAKE_BINARY_DIR}/${CUSTOM_RC_FILE}") + ENDIF(IS_ABSOLUTE "${CUSTOM_RC_FILE}") + MESSAGE(STATUS "") + MESSAGE(STATUS "Using custom RC template: ${UHD_RC_IN}") + MESSAGE(STATUS "") + ELSE() + SET(UHD_RC_IN "${CMAKE_CURRENT_SOURCE_DIR}/uhd.rc.in") + ENDIF(CUSTOM_RC_FILE) + SET(UHD_RC_IN ${UHD_RC_IN} CACHE STRING "uhd.rc template filepath") + CONFIGURE_FILE( - ${CMAKE_CURRENT_SOURCE_DIR}/uhd.rc.in + ${UHD_RC_IN} ${CMAKE_CURRENT_BINARY_DIR}/uhd.rc @ONLY) |