[CMake] creating a DLL with an OpenCV dependency
Hello, I have posted my question here because I forgot I was on this mailing list: http://stackoverflow.com/questions/28773650/cmake-for-windows-dll-with-opencv-project there you can find my Cmakelists.txt and some code snippets. This is my first time trying to build a DLL for windows with CMAKE. The gist of my problem is I am generating a .dll file, manifests, etc, but I am unable to load it using jsctypes and it is not giving me much error output other than "couldn't open dll" I would just like to find a way that my DLL is built correctly, before I switch to trying to build my project with VS2012 Thanks, Derek -- 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
Re: [CMake] Setting build type
Thanks for the help! It still runs Release mode: Here's my project: https://github.com/acgetchell/CDT-plusplus ┌─[*adam*][Hapkido][*±*][master *✗*][~/CDT-plusplus] └─▪ tree . |.git | |config | |description | |HEAD | |hooks | | |applypatch-msg.sample | | |commit-msg.sample | | |post-update.sample | | |pre-applypatch.sample | | |pre-commit.sample | | |pre-push.sample | | |pre-rebase.sample | | |prepare-commit-msg.sample | | |update.sample | |index | |info | | |exclude | |logs | | |HEAD | | |refs | | | |heads | | | | |master | | | |remotes | | | | |origin | | | | | |HEAD | |objects | | |info | | |pack | | | |pack-a9db5eb5c90025a8ca13bddf15822cb0e57cbead.idx | | | |pack-a9db5eb5c90025a8ca13bddf15822cb0e57cbead.pack | |packed-refs | |refs | | |heads | | | |master | | |remotes | | | |origin | | | | |HEAD | | |tags |.gitignore |.travis-linux.yml |.travis-macosx.yml |.travis.yml |build.sh |CMakeLists.txt |Doxyfile |LICENSE |README.md |scan-build.sh |src | |cdt.cpp | |Delaunay.h | |docopt | | |docopt.cpp | | |docopt.h | | |docopt_private.h | | |docopt_util.h | | |docopt_value.h | | |examples | | | |naval_fate.cpp | | |LICENSE-Boost-1.0 | | |LICENSE-MIT | | |main.cpp | | |README.rst | | |run_testcase.cpp | | |run_tests.py | | |testcases.docopt | |grid_d.cpp | |grid_d.h | |periodic_3_complex.h | |periodic_3_triangulations.h | |Point.h | |S3Action.h | |S3ErgodicMoves.h | |S3Triangulation.h | |sphere_d.h | |utilities.h |unittests | |.gitignore | |main.cpp | |PointTest.cpp | |S3BulkActionTest.cpp | |S3ErgodicMovesTest.cpp | |S3TetrahedronTest.cpp | |SdTriangulationTest.cpp | |SphereTest.cpp | |Triangulated2SphereTest.cpp | |VertexTest.cpp ┌─[*adam*][Hapkido][*±*][master *✗*][~/CDT-plusplus] └─▪ mkdir build-d ┌─[*adam*][Hapkido][*±*][master *✗*][~/CDT-plusplus] └─▪ cd build-d ┌─[*adam*][Hapkido][*±*][master *✗*][~/CDT-plusplus/build-d] └─▪ cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=out .. -- The C compiler identification is AppleClang 6.0.0.656 -- The CXX compiler identification is AppleClang 6.0.0.656 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Build type: Release -- USING CXXFLAGS = ' -O3 -DNDEBUG' -- USING EXEFLAGS = ' -Wl,-dylib_file,/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib ' -- Targetting Unix Makefiles -- Using /usr/bin/c++ compiler. -- DARWIN_VERSION=14 -- Mac Leopard detected -- Requested component: Core -- Requested component: MPFR -- Requested component: GMP -- Found Eigen3: /usr/local/include/eigen3 (found suitable version "3.2.4", minimum required is "3.1.0") -- Found Intel TBB -- Configuring done -- Generating done -- Build files have been written to: /Users/adam/CDT-plusplus/build-d ┌─[*adam*][Hapkido][*±*][master *✗*][~/CDT-plusplus/build-d] On Wed, Feb 25, 2015 at 1:37 AM, J Decker wrote: > mkdir build-d > cd build-d > cmake > -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=out ../your/source/procject > cmake --build . > cd .. > > mkdir build-r > cd build-r > cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=out > ../your/source/procject > cmake --build . --target install > cd .. > > > On Wed, Feb 25, 2015 at 1:16 AM, Adam Getchell > wrote: > >> Thanks for your reply. >> >> I'm not sure I follow your answer. I do delete the directory each time I >> build, but I'm still not understanding how you're building release or debug >> versions to begin with. >> >> I'm just automatically getting Release, unless I edit CMakeCache.txt >> after I've built once. >> >> I just checked CGAL_CreateSingleSourceCGALProgram.cmake which is invoked >> in my CMakeLists.txt, but I do not see it setting the build type to Release. >> >> https://github.com/acgetchell/CDT-plusplus/blob/master/CMakeLists.txt >> >> >> >> On Tue, Feb 24, 2015 at 12:20 PM, J Decker wrote: >> >>> I use a different directory to build release and debug versions >>> >>> if you didn't delete, then when it goes to build partial things, the >>> .obj files will still be newer than the .c files and will cause mixed >>> release-debug builds which generally results in bizarre crashes. >>> Once chosen, can't change the build type of a build; although
Re: [CMake] Multi-platform visual studio projects
That’s what I have been doing... :( -Original Message- From: John Drescher [mailto:dresche...@gmail.com] Sent: Friday, February 27, 2015 8:33 AM To: Scott Aron Bloom; CMake ML Subject: Re: [CMake] Multi-platform visual studio projects > I have been successful with > > Src\build.32 and src\build.64 so that on svn update effects both. > > The problem, for my automated build flow, I was hoping to make a mix, > 32/64 installer.. it’s a lot harder to do with two completely separate > build trees :( For this I just make separate installers. I use a naming convention such that win32 / win64 is part of the name of the generated nsis executable installer. John -- 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
Re: [CMake] Multi-platform visual studio projects
> I have been successful with > > Src\build.32 and src\build.64 so that on svn update effects both. > > The problem, for my automated build flow, I was hoping to make a mix, 32/64 > installer.. it’s a lot harder to do with two completely separate build trees > :( For this I just make separate installers. I use a naming convention such that win32 / win64 is part of the name of the generated nsis executable installer. John -- 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
Re: [CMake] Multi-platform visual studio projects
Thanks! -Original Message- From: John Drescher [mailto:dresche...@gmail.com] Sent: Friday, February 27, 2015 8:26 AM To: Scott Aron Bloom Cc: cmake@cmake.org Subject: Re: [CMake] Multi-platform visual studio projects > However, once the solution is created, does the "path" of the shell matter > at all? No. John -- 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
Re: [CMake] Multi-platform visual studio projects
> However, once the solution is created, does the "path" of the shell matter > at all? No. John -- 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
Re: [CMake] Multi-platform visual studio projects
Thanks.. I have been successful with Src\build.32 and src\build.64 so that on svn update effects both. The problem, for my automated build flow, I was hoping to make a mix, 32/64 installer.. it’s a lot harder to do with two completely separate build trees :( As to my second question, and this is purely my newb'ness with 64 bit visual studio. I know, to us "cl.exe" you must run the "vsvars" with the correct parameters, either for 32 or 64, before running cmake from the command line. And to create the proper vcproj files you must append "Win64" to the generator name. However, once the solution is created, does the "path" of the shell matter at all? Scott -Original Message- From: John Drescher [mailto:dresche...@gmail.com] Sent: Friday, February 27, 2015 8:06 AM To: Scott Aron Bloom Cc: cmake@cmake.org Subject: Re: [CMake] Multi-platform visual studio projects On Fri, Feb 27, 2015 at 10:44 AM, Scott Aron Bloom wrote: > Is it possible with cmake, to build a VS 2013, win32 and win64 vsproj > solution file set? > > If not, I understand, then I have a follow on question.. > No create 2 independent trees. I keep the source in a separate tree also. For example I have my source code in x:\CMakeBased\Libraries\ITK-4.7.0 x:\CMakeBased\Libraries\VTK-5.10.2 ... x:\CMakeBased\Qt\LungAnalysis x:\CMakeBased\Qt\StudyManager ... Where Libraries are source code libraries like ITK, VTK, GDCM, DCMTK ... And LungAnalysis, StudyManager ... are applications written by me. Then the build tress look like x:\64bit\VC.100\Libraries\ITK-4.7.0 x:\64bit\VC.100\Libraries\VTK-5.10.2 x:\64bit\VC.100\Qt\LungAnalysis ... x:\64bit\VC.120\Libraries\ITK-4.7.0 x:\64bit\VC.120\Libraries\VTK-5.10.2 x:\64bit\VC.120\Qt\LungAnalysis ... x:\32bit\VC.100\Libraries\ITK-4.7.0 x:\32bit\VC.100\Libraries\VTK-5.10.2 x:\32bit\VC.100\Qt\LungAnalysis John -- 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
Re: [CMake] Multi-platform visual studio projects
On Fri, Feb 27, 2015 at 10:44 AM, Scott Aron Bloom wrote: > Is it possible with cmake, to build a VS 2013, win32 and win64 vsproj > solution file set? > > If not, I understand, then I have a follow on question.. > No create 2 independent trees. I keep the source in a separate tree also. For example I have my source code in x:\CMakeBased\Libraries\ITK-4.7.0 x:\CMakeBased\Libraries\VTK-5.10.2 ... x:\CMakeBased\Qt\LungAnalysis x:\CMakeBased\Qt\StudyManager ... Where Libraries are source code libraries like ITK, VTK, GDCM, DCMTK ... And LungAnalysis, StudyManager ... are applications written by me. Then the build tress look like x:\64bit\VC.100\Libraries\ITK-4.7.0 x:\64bit\VC.100\Libraries\VTK-5.10.2 x:\64bit\VC.100\Qt\LungAnalysis ... x:\64bit\VC.120\Libraries\ITK-4.7.0 x:\64bit\VC.120\Libraries\VTK-5.10.2 x:\64bit\VC.120\Qt\LungAnalysis ... x:\32bit\VC.100\Libraries\ITK-4.7.0 x:\32bit\VC.100\Libraries\VTK-5.10.2 x:\32bit\VC.100\Qt\LungAnalysis John -- 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
[CMake] Multi-platform visual studio projects
Is it possible with cmake, to build a VS 2013, win32 and win64 vsproj solution file set? If not, I understand, then I have a follow on question.. Once the two solutions have been built, does it matter how you bring up VS 2013? Or does it only matter for the initial running of cmake ? Scott -- 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
Re: [CMake] control python exec. search from command line?
On Friday February 27 2015 10:44:11 Omar Valerio wrote: Hello Omar, >Well yes I suggest you to use a FIND_LIBRARY directive inside your >CMakeList.txt project file and HINT the compiler which location to prefer >for the library to get linked. ( >http://www.cmake.org/cmake/help/v3.0/command/find_library.html) Except that there's no need for a library, but for the python interpreter. The project in question is kdev-python (1.6.1) . >Would be helpful to know which version of CMake are you running, because in >previous versions of CMake there was a bug preventing CMake to found the >correct Python libraries. You can read more about here: 3.1.2 >Other than that there is and specific FindPython3Libs cmake module that you >may want to try. Here is the location where you can find it: > >https://qt.gitorious.org/pyside/shiboken/source/fdf8e4b70e2a82cda581ceae06a1c98fb20114f0:cmake/Modules/FindPython3Libs.cmake Thanks, I'll have a look ... but I'd just as much NOT introduce another dependency ... I'll ask around on the kdevelop ML too. R -- 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
[CMake] control python exec. search from command line?
Hello, I'm trying to build a project that uses FindPythonInterp.cmake to locate the python executable. Thing is that the system I'm working on has "python" pointing to a 2.7 install, while the project requires Python 3.x. Is there a way to influence the search from the command line? I tried -DPYTHON_EXECUTABLE:PATH="/path/to/python3" but that didn't cut it. Am I going to have to patch the CMake file that invokes the FindPythonInterp routine instead? Thanks, R. -- 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
Re: [CMake] can I make an AUTOMOC generated file depend on something ?
On Wed, Feb 25, 2015 at 10:45 PM, Stephen Kelly wrote: > Kim Rydhof Thor Hansen wrote: > >> http://www.cmake.org/cmake/help/v3.0/prop_tgt/AUTOGEN_TARGET_DEPENDS.html >> >> I have a similar problem because automoc doesn't pick up that my >> metadata.json file is a dependency to the generated moc_plugin.cpp >> when building a Qt plugin > > Thanks for the testcase. I filed > > http://public.kitware.com/Bug/view.php?id=15419 > > with more information on what should be done to fix this. Thanks for your work on this. I can't find a good workaround, I tried using autoget_target_depends without success but I suspect that it is because I have done something wrong. Can anyone suggest a line to put in CMakeLists.txt in order to manually register the dependency between metadata.json and moc_plugin.cpp? Regards, -- Kim Rydhof Thor Hansen Vadgårdsvej 3, 2. tv. 2860 Søborg Phone: +45 3091 2437 -- 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