diff options
author | Brad King <brad.king@kitware.com> | 2014-01-07 20:58:45 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-02-14 20:48:41 (GMT) |
commit | a6e4a95d6c6fb7ae4a91dff94763a9577f57d81e (patch) | |
tree | 9d0e4c33d58f5d0eaca137718aecc462fcd201e3 /src/CMakeLists.txt | |
parent | 8ffc22bdd0ec08598fc162e15bb416d51124087e (diff) | |
download | CastXML-a6e4a95d6c6fb7ae4a91dff94763a9577f57d81e.zip CastXML-a6e4a95d6c6fb7ae4a91dff94763a9577f57d81e.tar.gz CastXML-a6e4a95d6c6fb7ae4a91dff94763a9577f57d81e.tar.bz2 |
Compute resource directory on startup
Add a findResourceDir function to locate resources relative to the
executable location at the start of main and a getResourceDir
function to lookup the result later.
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r-- | src/CMakeLists.txt | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index f497e4f..97e1a02 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -14,11 +14,23 @@ # limitations under the License. #============================================================================= +# Tell executables in the build tree where to find the source tree. +configure_file( + "SourceDir.txt.in" + "${CastXML_BINARY_DIR}/CMakeFiles/castxmlSourceDir.txt" @ONLY + ) + llvm_map_components_to_libraries(llvm_libs native option bitreader) -add_executable(castxml castxml.cxx) +add_executable(castxml + castxml.cxx + + Utils.cxx Utils.h + ) target_link_libraries(castxml cxsys ${llvm_libs} ) +set_property(SOURCE Utils.cxx APPEND PROPERTY COMPILE_DEFINITIONS + "CASTXML_INSTALL_DATA_DIR=\"${CastXML_INSTALL_DATA_DIR}\"") install(TARGETS castxml DESTINATION ${CastXML_INSTALL_RUNTIME_DIR}) |