Hi all
I have a non-standard set-up where I have a library that needs to be linked together with some extra source files that contain "registries"). So in my CMakeLists.txt I use Add_executable(wonderful_program wonderful_program.cxx registry.cxx) target_link_libraries(wonderful_program mylib) registry.cxx needs to be compiled with some of my include files. For that, I added include_directories("${PROJECT_SOURCE_DIR}/src/include") I guess I could just as well have added SET_PROPERTY(SOURCE registry.cxx PROPERTY COMPILE_FLAG "-I${STIR_INCLUDE_DIR}") This works fine, but now I want to export my library (relocatable). I have created a config file etc, added mylib as an install target, installed the include files etc. All of that works great for the library. However, I have no idea how to install registry.cxx. I could just INSTALL(FILES registry.cxx .) However, that doesn't copy the properties of the source files anywhere. In particular, it means that a "client" doesn't know what compilation flags to use. Any ideas? Best wishes for 2017! Kris PS: The reason that I need registry.cxx is that it contains some variables that have a funky constructor that initialises some registries somewhere. PS: Full source code is at https://github.com/UCL/STIR
-- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake