diff options
author | Josh Blum <josh@joshknows.com> | 2010-04-19 23:48:00 -0700 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2010-04-19 23:48:00 -0700 |
commit | 6b015b1c517733e85cb0c08a379e8d20377bf2fa (patch) | |
tree | 4c94d069b809bf7ad1f8aaf95542b7cbbdc6e4dc /host/lib/CMakeLists.txt | |
parent | 97b288f7d3ee0fc0fd596f6ba454cf07304474e0 (diff) | |
download | uhd-6b015b1c517733e85cb0c08a379e8d20377bf2fa.tar.gz uhd-6b015b1c517733e85cb0c08a379e8d20377bf2fa.tar.bz2 uhd-6b015b1c517733e85cb0c08a379e8d20377bf2fa.zip |
added comments to cmakelists, makedir in file generation script so python doesnt have to
Diffstat (limited to 'host/lib/CMakeLists.txt')
-rw-r--r-- | host/lib/CMakeLists.txt | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/host/lib/CMakeLists.txt b/host/lib/CMakeLists.txt index 7b8149802..7cb74d30a 100644 --- a/host/lib/CMakeLists.txt +++ b/host/lib/CMakeLists.txt @@ -66,11 +66,18 @@ SET(libuhd_sources # Generate Files ######################################################################## MACRO(UHD_PYTHON_GEN_SOURCE_FILE pyfile outfile) + #ensure that the directory exists for outfile + GET_FILENAME_COMPONENT(outfile_dir ${outfile} PATH) + FILE(MAKE_DIRECTORY ${outfile_dir}) + + #make the outfile depend on the python script ADD_CUSTOM_COMMAND( OUTPUT ${outfile} DEPENDS ${pyfile} COMMAND ${PYTHON_EXECUTABLE} ${pyfile} ${outfile} COMMENT "Generating ${outfile}" ) + + #make libuhd depend on the outfile LIST(APPEND libuhd_sources ${outfile}) ENDMACRO(UHD_PYTHON_GEN_SOURCE_FILE) |