[CMake] Problems finding dependence library

2012-09-20 Thread Reza Housseini
Hello list I have a problem finding a dependent library of my own libsieve.so: set(CPPLIB_DIR "${CMAKE_SOURCE_DIR}/../core/build") find_library(CPPLIB_SIEVE_LIBRARY NAMES libsieve PATHS CPPLIB_DIR) I have the following folder structure: core build libsieve.so project CMakeLists.txt It

Re: [CMake] Problems finding dependence library

2012-09-20 Thread Reza Housseini
On Thu, Sep 20, 2012 at 5:32 PM, Bogdan Cristea wrote: > On Thursday 20 September 2012 17:25:35 Reza Housseini wrote: >> set(CPPLIB_DIR "${CMAKE_SOURCE_DIR}/../core/build") >> find_library(CPPLIB_SIEVE_LIBRARY NAMES libsieve PATHS CPPLIB_DIR) > > Use instead si

Re: [CMake] Problems finding dependence library

2012-09-21 Thread Reza Housseini
On Fri, Sep 21, 2012 at 1:55 PM, Bogdan Cristea wrote: > On Friday 21 September 2012 07:48:27 you wrote: >> Thank you for your answer. I tried that but it didn't work. Paths are >> alright. I even used absolute paths. What could be the problem of >> that? > > Have a look at CMakeError.log > > -- >

[CMake] Custom command with included header file

2012-09-21 Thread Reza Housseini
Hello I want to add my own library libsieve.so with the header file Sieve.h to the custom target. I have the following setup: find_program(MKOCTFILE_EXECUTABLE mkoctfile) if(NOT MKOCTFILE_EXECUTABLE) message(SEND_ERROR "Failed to find mkoctfile, is it in your $PATH?") endif() set(OCT_FILE "mult

Re: [CMake] Custom command with included header file

2012-09-24 Thread Reza Housseini
On Fri, Sep 21, 2012 at 2:26 PM, Reza Housseini wrote: > Hello > I want to add my own library libsieve.so with the header file Sieve.h > to the custom target. I have the following setup: > > find_program(MKOCTFILE_EXECUTABLE mkoctfile) > if(NOT MKOCTFILE_EXECUTABLE) > messa

[CMake] Linking library with custom target

2012-12-13 Thread Reza Housseini
Hello I want to link a library to a custom target: add_custom_command( OUTPUT ${FILE} DEPENDS ${SRC} COMMAND ${EXECUTABLE} ARGS ${SRC} COMMENT "Generating ${FILE}" VERBATIM) add_custom_target(mytarget ALL DEPENDS ${FILE}) target_link_libraries(mytarget /usr/local/lib/libmylib.so)

[CMake] How to import platform-independent library with add_library()?

2012-12-14 Thread Reza Housseini
Hello Guys I try to import a library and was now wondering if there's a platform-independent way? Here's my code: add_library(mylib SHARED IMPORTED) set_target_properties(mylib PROPERTIES IMPORTED_LOCATION ${CPPLIB_DIR}/libmylib.so) But now what about using this CMakeLists.txt file under

Re: [CMake] How to import platform-independent library with add_library()?

2012-12-14 Thread Reza Housseini
On Fri, Dec 14, 2012 at 11:47 AM, Andreas Pakulat wrote: > Hi, > > On Fri, Dec 14, 2012 at 11:16 AM, Reza Housseini > wrote: >> Hello Guys >> >> I try to import a library and was now wondering if there's a >> platform-independent way? > > Not in

[CMake] Components not recognized with FindHDF5.cmake

2013-10-20 Thread Reza Housseini
Hello I try to find the hdf5 libraries, but it seems that the components are not recognized. I use FIND_PACKAGE(HDF5 COMPONENTS C CXX HL REQUIRED) but it only comes up with the libhdf5.so and doesn't detect libhdf5_cpp.so and libhdf5_hl.so. I also cleaned the whole build directory but withou