Re: [CMake] Adding a reference to a .NET dll in my C++/CLI project

2012-01-04 Thread Aaron Ten Clay

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 01/04/12 14:32, brian wrote:
> I've been able to generate VS 2010 solution's via CMake for my C++/CLI
project (.NET project). We've added the log4net.dll to the project by
hand. This is the .NET version of the log4j project. What I'd like to do
is add a reference to this DLL to the solution via cmake using a
Findlog4net.cmake file with a given version number but haven't figured
out how to integrate this since its a dll only.
>
> I've tried,
> find_library(LOG4NET_LIB log4net ${PATH_TO_DLL_LOCATION})
>
> but this hasn't worked.
>
> Any ideas?
>
> Brian
>
>
> --
>
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
I recently submitted a patch for CMake to allow linking against .NET
DLLs. The code to support this should be in 2.8.7. The way to accomplish
the .NET linking is:

set_target_properties(your_target VS_DOTNET_REFERENCES
"System;Log4Net.Logger")

or whatever the necessary namespaces are. You will of course need the
relevant DLLs in the system search path at build and run time.

Hope that helps.

- -Aaron



- -- 
Aaron Ten Clay
MadeByAI Consulting
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.17 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk8E9tsACgkQXXAPYyclsaWHLgCffvl0ffA7hnl3yCC1y9JXPWRx
7P8AnAmC4jYSGOzkiNMiMl/onsBrNLB6
=KRmB
-END PGP SIGNATURE-

--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] execute_process appending redirected output

2011-12-27 Thread Aaron Ten Clay

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 12/27/11 16:16, Belcourt, Kenneth wrote:
> Hi,
>
> I'm trying to get CMake to execute this command
>
> INSTALL(CODE
> "EXECUTE_PROCESS (COMMAND cat
\"${CMAKE_CURRENT_SOURCE_DIR}/onejar_classpath.txt >>
${CMAKE_INSTALL_PREFIX}/onejar/boot-manifest.mf\")"
> )
>
> but this doesn't work, here's the error I get when I run the install.
>
> cat: /home/wec_devs/bkn.cn/caslvipre/rpa/deport/onejar_classpath.txt >>
/home/wec_devs/bkn.cn/caslvipre/U233_INTEL/onejar/boot-manifest.mf: No
such file or directory
>
> I've checked that both the source and target files exist and are
writable. Any ideas on how to get this to work?
>
> Thanks.
>
> -- Noel Belcourt
>
>
> --
>
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake

It looks as thought you might be missing some escaped double-quotes. The
"/home/wec_devs/bkn.cn/caslvipre/rpa/deport/onejar_classpath.txt >>
/home/wec_devs/bkn.cn/caslvipre/U233_INTEL/onejar/boot-manifest.mf" is
one argument in your example. Try this:

INSTALL(CODE
  "EXECUTE_PROCESS (COMMAND cat
\"${CMAKE_CURRENT_SOURCE_DIR}/onejar_classpath.txt\" >>
\"${CMAKE_INSTALL_PREFIX}/onejar/boot-manifest.mf\")"
)


It's also worth noting that this is not a cross-platform command. Maybe
look at file(READ ...) followed by file(APPEND ...)?

- -- 
Aaron Ten Clay
MadeByAI Consulting
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.17 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk76sWQACgkQXXAPYyclsaVZOQCfWGoKsR/oXT7m9MmJzOnzt/l2
M1YAnjthOkhjOqlaUdEqm+XYjj/fU+oc
=Z0ID
-END PGP SIGNATURE-

--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Printing the detailed link command call

2011-12-27 Thread Aaron Ten Clay

On 12/26/2011 6:18 AM, Ceylow wrote:

Hello,

I'm having some troubles with a linking step and I would like to see exactly 
which parameters are given to my compiler when running the Makefile generated 
by CMake.

Currently it only shows:
Linking CXX shared library xxx

which isn't enough for me to find out why I have undefined symbols. I couldn't 
find any information about this on the web (maybe searching with the wrong 
words but...).

Thanks,
Ceylo

Ceylo,

Try using 'make VERBOSE=1' instead of 'make', this will cause the 
command lines to be displayed just before execution.


-Aaron
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake