[CMake] combine multiple library into a single one

2014-06-21 Thread Emanuele Cannizzaro
Dear Sir/Madame, I am trying to create a library that it depends on compiler flags. I can create 4 library that will all together include all the functions required, that is add_library(amd_di SHARED ${SRC_LIST} ${HEADER_FILES}) target_link_libraries(amd_di m) add_library(amd_dl SHARED ${SRC_

[CMake] add_custom_command not creating rules when output file is not a c++ header/source file

2014-06-21 Thread Wojciech Mamrak
Hello List, According to the docs: A target created in the same directory that specifies any output of the custom command as a source file is given a rule to generate the file using the command at build time. Above statement is clear and works fine if output file is .h/.cpp file. And how about e.

Re: [CMake] What are the best practices for project installation hierarchy?

2014-06-21 Thread Egor Tensin
So you suggest that I define "full" relative paths in each CMakeLists.txt? Like install(TARGETS foo DESTINATION "bin/examples/lib1") instead of install(TARGETS foo DESTINATION "${INSTALL_PREFIX}/lib1") That's an option to consider, of course... On Sat, Jun 21, 2014 at 10:52 PM, J Decker wrote

Re: [CMake] What are the best practices for project installation hierarchy?

2014-06-21 Thread J Decker
Install has a DESTINATION option; which should be used rather than modifying what the install path is well I guess depends on the method... install( targets ) has 3 destinations, LIBRARY_DESTINTION, RUNTIME_DESTINATION, (something)_DESTINATION for shared library output On Sat, Jun 21, 2014 at

[CMake] What are the best practices for project installation hierarchy?

2014-06-21 Thread Egor Tensin
Hello, I'm bothered with my approach to `install`ing CMake-enabled project components. The whole source tree is separated into "libs" and "examples" subdirectories, with a lot of libraries under the "libs" subdirectory and library usage examples under the "examples" subdirectory. For example: . ├