Re: [CMake] Problem with creating shared library

2018-09-01 Thread Damir Porobic
From: Damir Porobic Sent: Friday, August 24, 2018 9:37:30 PM To: Sebastián Mancilla Cc: cmake@cmake.org Subject: Re: [CMake] Problem with creating shared library I've fixed both issues, the second by implementing the pimpl idiom but still I can't used the library in the other projec

Re: [CMake] Problem with creating shared library

2018-08-26 Thread Damir Porobic
_ From: Damir Porobic Sent: Friday, August 24, 2018 9:37:30 PM To: Sebastián Mancilla Cc: cmake@cmake.org Subject: Re: [CMake] Problem with creating shared library I've fixed both issues, the second by implementing the pimpl idiom but still I can't used the library in the other projec

Re: [CMake] Problem with creating shared library

2018-08-24 Thread Damir Porobic
about this one: auto kImageAnnotator = new KImageAnnotator(pixmap); kImageAnnotator->show(); kImageAnnotator->testMethod(); From: Sebastián Mancilla Sent: Thursday, August 23, 2018 22:13 To: Damir Porobic Cc: cmake@cmake.org Subject: Re: [CMake] Problem wit

Re: [CMake] Problem with creating shared library

2018-08-23 Thread Sebastián Mancilla
> > > And the CMake looks like this: > > find_package(kImageAnnotator REQUIRED) > > add_executable(testApp main.cpp) > target_link_libraries(testApp kImageAnnotator) > > > Am I missing something again? > > > > -- > *From:*

Re: [CMake] Problem with creating shared library

2018-08-22 Thread Damir Porobic
) target_link_libraries(testApp kImageAnnotator) Am I missing something again? From: Sebastián Mancilla Sent: Wednesday, August 22, 2018 00:51 To: Eric Noulard Cc: Damir Porobic; cmake@cmake.org Subject: Re: [CMake] Problem with creating shared library I fixed

Re: [CMake] Problem with creating shared library

2018-08-21 Thread Sebastián Mancilla
I fixed your problem. Get the attached patch and apply it with "git apply ". The kImageAnnotator constructor was private to the library (I just learned that Qt does that when creating shared libraries), and that's why you get the undefined reference error. You could have checked it with: nm

Re: [CMake] Problem with creating shared library

2018-08-21 Thread Eric Noulard
Le lun. 20 août 2018 à 19:05, Damir Porobic a écrit : > Hi Eric, > > > yes, this is the project. I have pushed my current state to this branch > https://github.com/DamirPorobic/kImageAnnotator/tree/sharedLibTestBranch > > I've tried also without the generate_export_headers (cleaned everything up

Re: [CMake] Problem with creating shared library

2018-08-20 Thread Damir Porobic
From: Eric Noulard Sent: Sunday, August 19, 2018 22:44 To: Damir Porobic Cc: smanc...@jlab.org; CMake Mailinglist Subject: Re: [CMake] Problem with creating shared library Hi Damir, May be the issue has nothing to do with the way you build the exported <>Config.cmake files. Since may be some na

Re: [CMake] Problem with creating shared library

2018-08-19 Thread Eric Noulard
xample_autogen/mocs_compilation.cpp.o > [100%] Linking CXX executable kImageAnnotator-example > CMakeFiles/kImageAnnotator-example.dir/main.cpp.o: In function `main': > /home/dporobic/projects/kImageAnnotator/example/main.cpp:29: undefined > reference to `KImageAnnotator::KImageA

Re: [CMake] Problem with creating shared library

2018-08-19 Thread Damir Porobic
otator-example' failed Any idea what I'm doing wrong? It looks like the same issue that I was having earlier. From: Sebastián Mancilla Sent: Wednesday, August 15, 2018 21:48 To: damir_poro...@live.com Cc: cmake@cmake.org Subject: Re: [CMake] Problem with cr

Re: [CMake] Problem with creating shared library

2018-08-15 Thread Sebastián Mancilla
You are mixing the config file and the targets file. The config file is a template that you normally put in cmake/ FooConfig.cmake.in You copy the template into the binary dir: include(CMakePackageConfigHelpers) set(INSTALL_CONFIGDIR lib/cmake/Foo) configure_package_config_file(

Re: [CMake] Problem with creating shared library

2018-08-15 Thread Eric Noulard
Le mer. 15 août 2018 à 10:32, Damir Porobic a écrit : > Hi Folks, > > > I'm trying to write a shared library and run into an issue where I can't > find any clues to where the problem is. > > I have a project with following structure: > > > src/ > > dir1/ > > file1.h > >

[CMake] Problem with creating shared library

2018-08-15 Thread Damir Porobic
Hi Folks, I'm trying to write a shared library and run into an issue where I can't find any clues to where the problem is. I have a project with following structure: src/ dir1/ file1.h file1.cpp dir2/ file2.h file2.cpp Now I have this