Re: [CMake] Hard to do if in Macro

2018-01-30 Thread J Decker
Okay... but then with function I can't set external variables; but if( __ANDROID__ ) works. `result` never changes. --- set( __ANDROID__ 1 ) function( test __ANDROID__ RETVAL ) if( ${__ANDROID__} EQUAL 1 OR ${__ANDROID__} STREQUAL "ON") set( ${RETVAL} ${${RETVAL}}

[CMake] Referencing nuget packages in csharp csproj files

2018-01-30 Thread Joern Hauser
Hello, we're looking into generating our C# projects using CMAKE. We can generate working solution files, but we're still struggling with dependencies. We would like to manage nuget packages via the nuget.exe command line tool. With the install or restore parameter this deems us a good approach

Re: [CMake] Hard to do if in Macro

2018-01-30 Thread Petr Kmoch
Macros aren't functions, and macro parameters aren't CMake variables. Expanding a macro parameter is effectively *textual* substitution, whereas dereferencing a CMake variable is a semantic one. In other words, inside your macro, the text __ANDROID__ (when not expanded) never refers to the macro p

[CMake] Hard to do if in Macro

2018-01-30 Thread J Decker
Why do I have to do if( ${M__ANDROID__} EQUAL 1 OR ${M__ANDROID__} STREQUAL "ON") endif( ${M__ANDROID__} EQUAL 1 OR ${M__ANDROID__} STREQUAL "ON") in a macro like... -- set( __ANDROID__ 1 ) macro( test __ANDROID__ ) if( ${__ANDROID__} EQUAL 1 OR ${__ANDROID__} STREQUAL "O