Re: [CMake] set_target_properties ( INTERFACE_INCLUDE_DIRECTORIES ...)

2019-09-12 Thread Petr Kmoch
For completeness, there is also OPTION C: set_property(TARGET target PROPERTY INTERFACE_INCLUDE_DIRECTORIES directory1 directory2) set_target_properties() is a shorthand for setting several properties at once, so it assumes its arguments are prop value prop value. If you need finer control, suc

Re: [CMake] set_target_properties ( INTERFACE_INCLUDE_DIRECTORIES ...)

2019-09-12 Thread Theodore Hall
On Thu, Sep 12, 2019 at 6:31 PM Craig Scott wrote: OPTION A: Put quotes around a semi-colon separated string if using > set_target_properties(): > Many thanks. I had tried quotes, and I had tried a semi-colon, and I thought that I had tried them together, but evidently I missed that permutation

Re: [CMake] set_target_properties ( INTERFACE_INCLUDE_DIRECTORIES ...)

2019-09-12 Thread Craig Scott
On Fri, Sep 13, 2019 at 8:24 AM Theodore Hall wrote: > Greetings, > > set_target_properties(target PROPERTIES > IMPORTED_LOCATION location > IMPORTED_IMPLIB implib > INTERFACE_INCLUDE_DIRECTORIES directory+ > ) > > Is there a way to assign more than one directory to > INTERFACE_IN

[CMake] set_target_properties ( INTERFACE_INCLUDE_DIRECTORIES ...)

2019-09-12 Thread Theodore Hall
Greetings, set_target_properties(target PROPERTIES IMPORTED_LOCATION location IMPORTED_IMPLIB implib INTERFACE_INCLUDE_DIRECTORIES directory+ ) Is there a way to assign more than one directory to INTERFACE_INCLUDE_DIRECTORIES ? The property name is plural, but every attempt I've

[CMake] compile_commands.json question

2019-09-12 Thread 15 knots
Hi all, this is more a question to the cmake developers. Older versions (3.15.0) of cmake produced short file names w/o spaces on windows, when the path of the compiler executable contained spaces. Now I have an issue [1] where compiler executable path contains spaces with cmake 3.15.2. Can anyon

Re: [CMake] Setting RPATH lookup on macOS

2019-09-12 Thread Juan Sanchez
I never suggested copying files into the build tree. The original question was about how to locate libraries at runtime. You don't necessarily have to use @rpath, @executable_path is also a valid option. Another valid option one is to strip out @rpath and use DYLD_LIBRARY_PATH or DYLD_FALLBACK_L

Re: [CMake] Setting RPATH lookup on macOS

2019-09-12 Thread Michael Jackson
On macOS you really should _not_ have to copy the libraries into the build tree. I have never had to do that in 10 years of our product (Windows is a different story). The trick is setting the correct options to add in the paths to the libraries into the RPATH of the executable/library. (at leas

Re: [CMake] Setting RPATH lookup on macOS

2019-09-12 Thread Juan Sanchez
The macOS install_name_tool can be used to change the RPATH of your binaries. It can also be used to set the path for each of the libraries to be loaded. For a python module I compile, I copy each of its dylib into the appropriate directory relative to my shared library. I then use the install_n

Re: [CMake] Packaging a directory with CPack RPM

2019-09-12 Thread Eric Noulard
Le jeu. 12 sept. 2019 à 02:27, Ashish Sadanandan < ashish.sadanan...@gmail.com> a écrit : > Hello, > I'm using CPack to create RPMs for an application. I have this working but > the CPack step is quite slow. While investigating this, I noticed that all > files in a directory I'm packaging, which c

[CMake] can not import target external lib before being build

2019-09-12 Thread Stéphane Ancelot
Hi, I am using this cmake snippet in order to build an external library # -- QGLViewer -- set(QGLVIEWER_FILES ${CMAKE_BINARY_DIR}/libQGLViewer-2.7.1/QGLViewer/qglviewer.h) get_target_property (QT_QMAKE_EXECUTABLE Qt5::qmake IMPORTED_LOCATION) add_custom_command(OUTPUT ${QGLVIEWE