Re: [CMake] Good practice: using INTERFACE-libraries in FindABC.cmake?

2016-03-01 Thread Patrick Boettcher
On Mon, 29 Feb 2016 21:20:59 +0100
Stephen Kelly  wrote:

> Patrick Boettcher wrote:
> 
> > I came across the INTERFACE-type of libraries when writing a
> > FindModule.cmake-file for custom libraries installed by my
> > project.  
> 
> You don't provide FindModules for your CMake-built libraries. 

Thank you for the pointer. I wasn't aware of it and haven't entirely
understood it yet.

However, when I said 'for custom libraries installed by my project' I
was not referring to cmake-based projects. These libraries are used as
is and for the moment I don't want to integrate them via ExternalProject.

--
Patrick.
-- 

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] Visual Studio and ExternalProject_Add

2016-03-01 Thread Kevin Brightwell
I've been having great success with using ExternalProject over the terrible
git submodules. However, when using Visual Studio, the following error
happens:

 Performing download step (git clone) for 'catch-lib'
2>  Cloning into 'catch-lib'...
2>  Note: checking out 'tags/v1.3.4'.
2>
2>  You are in 'detached HEAD' state. You can look around, make experimental
2>  changes and commit them, and you can discard any commits you make in
this
2>  state without impacting any branches by performing another checkout.
2>
2>  If you want to create a new branch to retain commits you create, you may
2>  do so (now or later) by using -b with the checkout command again.
Example:
2>
2>git checkout -b 
2>
2>  HEAD is now at 3b4edd7... Build for v1.3.4
2>  fatal: 'submodule' appears to be a git command, but we were not
2>  able to execute it. Maybe git-submodule is broken?
2>  CMake Error at
C:/Users/kevin/dev/sol2/vendor/tmp/catch-lib-gitclone.cmake:58 (message):
2>Failed to init submodules in:
2>'C:/Users/kevin/dev/sol2/vendor/src/catch-lib'

​The CMake file is located here:
https://github.com/Nava2/sol2/blob/cmake-build/CMakeLists.txt

Steps I've verified:

   - git.exe is on my system PATH
   - The submodule URL is valid
   - Builds on OSX/Linux
   - Reinstalled git (twice)​

​I'm new to Visual Studio (I work primarily with Linux/OSX), so I'm sure
I'm missing something along the way.

Thanks,​

--
Kevin Brightwell*. BESc., BSc.*
​MESc. Candidate 2017
Western University​
-- 

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-developers] [CMake 0015998]: Add variable to cmake in order to decide whether building is for android

2016-03-01 Thread Mantis Bug Tracker

The following issue has been SUBMITTED. 
== 
https://cmake.org/Bug/view.php?id=15998 
== 
Reported By:huiyiqun
Assigned To:
== 
Project:CMake
Issue ID:   15998
Category:   CMake
Reproducibility:always
Severity:   minor
Priority:   normal
Status: new
== 
Date Submitted: 2016-03-02 00:26 EST
Last Modified:  2016-03-02 00:26 EST
== 
Summary:Add variable to cmake in order to decide whether
building is for android
Description: 
I'm build a cmake project(YouCompleteMe) under Android. Everything works well
except that ld try to link librt wrongly, which has been integrated into Bionic
and not available under Android System.

I have googled for a while to look for a solution to detect android system in
cmake, but there is none.

If I am building a program for Mac OS X, there is a variable APPLE to tell me
that this is a Mac OS X instead of normal BSD. But there is no variable ANDROID
to tell me that this is a Android System instead of normal Linux. In my opinion,
these two scenes are similar.

Of course, I could define a variable to differ Android from normal Linux. but I
guess we need an official way to do this.
== 

Issue History 
Date ModifiedUsername   FieldChange   
== 
2016-03-02 00:26 huiyiqun   New Issue
==

-- 

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-developers


[Cmake-commits] CMake branch, master, updated. v3.5.0-rc3-156-g8913ccc

2016-03-01 Thread Kitware Robot
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, master has been updated
   via  8913ccca435b2da47f79a219a10e69e45a492e14 (commit)
  from  3cc22dffb766f1e6ef90c3809d5954b14106b61d (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8913ccca435b2da47f79a219a10e69e45a492e14
commit 8913ccca435b2da47f79a219a10e69e45a492e14
Author: Kitware Robot <kwro...@kitware.com>
AuthorDate: Wed Mar 2 00:01:05 2016 -0500
Commit: Kitware Robot <kwro...@kitware.com>
CommitDate: Wed Mar 2 00:01:05 2016 -0500

CMake Nightly Date Stamp

diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index 39b1b04..c5d01f6 100644
--- a/Source/CMakeVersion.cmake
+++ b/Source/CMakeVersion.cmake
@@ -1,5 +1,5 @@
 # CMake version number components.
 set(CMake_VERSION_MAJOR 3)
 set(CMake_VERSION_MINOR 5)
-set(CMake_VERSION_PATCH 20160301)
+set(CMake_VERSION_PATCH 20160302)
 #set(CMake_VERSION_RC 1)

---

Summary of changes:
 Source/CMakeVersion.cmake |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


hooks/post-receive
-- 
CMake
___
Cmake-commits mailing list
Cmake-commits@cmake.org
http://public.kitware.com/mailman/listinfo/cmake-commits


[cmake-developers] [CMake 0015997]: CMake 3.5 fails to build on OS X with GTK framework installed

2016-03-01 Thread Mantis Bug Tracker

The following issue has been SUBMITTED. 
== 
https://public.kitware.com/Bug/view.php?id=15997 
== 
Reported By:Andrew.W
Assigned To:
== 
Project:CMake
Issue ID:   15997
Category:   CMake
Reproducibility:always
Severity:   block
Priority:   normal
Status: new
== 
Date Submitted: 2016-03-02 14:56 AEDT
Last Modified:  2016-03-02 14:56 AEDT
== 
Summary:CMake 3.5 fails to build on OS X with GTK framework
installed
Description: 
Running bootstrap on OS X fails with GTK framework installed in
/Library/Frameworks.

Error is:
CMake Error at Modules/FindGTK2.cmake:182 (file):
  file STRINGS file
  "/Library/Frameworks/Gtk.framework/Headers/gtk/gtk/gtkversion.h" cannot be
  read.

Actual path is /Library/Frameworks/Gtk.framework/Headers/gtk/gtkversion.h

I fixed the error by editing Modules/FindGTK2.cmake and changing references from
  ${GTK2_GTK_INCLUDE_DIR}/gtk/gtkversion.h
to
  ${GTK2_GTK_INCLUDE_DIR}/gtkversion.h
Lines 631 and 883

Steps to Reproduce: 
Download CMake ( cmake-3.5.0-rc3 )
Run 'bootstrap'
== 

Issue History 
Date ModifiedUsername   FieldChange   
== 
2016-03-02 14:56 Andrew.W   New Issue
==

-- 

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-developers


[CMake] best way of parsing test results from ctest + valgrind

2016-03-01 Thread Aaron Boxer
Hello,
I am just getting started on using valgrind memory analysis for my tests.
When I run ctest with nightly memory check, I get an XML document, but it
is very hard to read the results. What is the best way of reading this doc?

Thanks!
Aaron
-- 

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-commits] CMake branch, next, updated. v3.5.0-rc3-317-gc3f20a8

2016-03-01 Thread Clinton Stimpson
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
   via  c3f20a8861467bdf85322b184cf060c822d3b2c8 (commit)
   via  53dbbaa907131c3302a037c3c8d2c1ca5eb19027 (commit)
  from  cc20b98859ecfaafe607d2bc2075ef71dde4a07d (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c3f20a8861467bdf85322b184cf060c822d3b2c8
commit c3f20a8861467bdf85322b184cf060c822d3b2c8
Merge: cc20b98 53dbbaa
Author: Clinton Stimpson 
AuthorDate: Tue Mar 1 17:54:59 2016 -0500
Commit: CMake Topic Stage 
CommitDate: Tue Mar 1 17:54:59 2016 -0500

Merge topic 'bundle-utils-logic-fix' into next

53dbbaa9 BundleUtilities:  Fix regression handling frameworks.


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=53dbbaa907131c3302a037c3c8d2c1ca5eb19027
commit 53dbbaa907131c3302a037c3c8d2c1ca5eb19027
Author: Clinton Stimpson 
AuthorDate: Tue Mar 1 15:48:14 2016 -0700
Commit: Clinton Stimpson 
CommitDate: Tue Mar 1 15:52:33 2016 -0700

BundleUtilities:  Fix regression handling frameworks.

Fix logic error introduced in e422f738.

diff --git a/Modules/BundleUtilities.cmake b/Modules/BundleUtilities.cmake
index 73ff0af..4b52afa 100644
--- a/Modules/BundleUtilities.cmake
+++ b/Modules/BundleUtilities.cmake
@@ -479,7 +479,7 @@ function(set_bundle_key_values keys_var context item 
exepath dirs copyflag)
 
 get_item_rpaths("${resolved_item}" item_rpaths)
 
-if((item NOT MATCHES "\\.dylib$") AND (item MATCHES "[^/]+\\.framework/"))
+if((NOT item MATCHES "\\.dylib$") AND (item MATCHES "[^/]+\\.framework/"))
   # For frameworks, construct the name under the embedded path from the
   # opening "${item_name}.framework/" to the closing "/${item_name}":
   #

---

Summary of changes:
 Modules/BundleUtilities.cmake |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


hooks/post-receive
-- 
CMake
___
Cmake-commits mailing list
Cmake-commits@cmake.org
http://public.kitware.com/mailman/listinfo/cmake-commits


Re: [cmake-developers] CMakeFindDependencyMacro limitations

2016-03-01 Thread Roger Leigh

On 24/02/2016 22:49, Roger Leigh wrote:

I've attached a patch for a very simple modification to find_dependency.
  I'm not proposing that it be merged, it's just a suggestion for
further discussion.  I've tested it with my own packages with multiple
find_dependency(Boost COMPONENTS ...) calls.  Some rationale and
thoughts follow:


Did anyone have any time to take a look at this?  Are there any 
objections or further questions arising from the approach taken here? 
Could it be submitted for inclusion if not?



Thanks,
Roger
--

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-developers


[cmake-developers] Proposed patch for 0014140: Ninja generator doesn't set version in dylib

2016-03-01 Thread Bruce Stephens
I just copied the relevant code from the Makefiles generator. (And now
I find gmail
doesn't let me change the properties of the attachment. Bother.)


0001-Copy-logic-for-OS-X-dylib-versioning-to-Ninja-genera.patch
Description: Binary data
-- 

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-developers

Re: [cmake-developers] C# support ready for review

2016-03-01 Thread Robert Goulet
Adding test cases to the CMake source is most likely required. But that's 
probably much more involving than just writing a test case for one feature.

As for testing C# support, we only have one C# solution in our entire code 
base, so that wouldn't represent a good validation of the possible diversity 
out there. Besides, I'm not much familiar with C# development myself, and I 
would probably just end up comparing relevant differences between our current 
C# solution and what CMake would output. Not sure if I can really help here.

-Original Message-
From: Stuermer, Michael SP/HZA-ZSEP [mailto:michael.stuer...@schaeffler.com] 
Sent: Tuesday, March 1, 2016 3:50 AM
To: Robert Goulet ; Gilles Khouzam 
; CMake Developers 
Subject: RE: C# support ready for review

Ok, this leads me to the question: what is needed/missing for acceptance to 
'master'? More Documentation? More Tests? What features have to be provided by 
the module scripts? Probably some code formatting (I surely missed some 
indentation stuff and tabs instead of spaces)...

I am currently facing the problem that everything works well for me and I don't 
know what features would be required by others to work with the module. I got 
two points:

 - make LangVersion configurable
 - detect MSBuild from registry

Are there additional things missing for general use of the C# support?

best regards,
Michael

> -Original Message-
> From: Robert Goulet [mailto:robert.gou...@autodesk.com]
> Sent: Monday, February 29, 2016 3:16 PM
> To: Stuermer, Michael SP/HZA-ZSEP; Gilles Khouzam; CMake Developers
> Subject: RE: C# support ready for review
> 
> As soon as this is merged in 'master' I will give it a try. We are 
> extremely interested to have C# support in CMake. That is the last 
> piece of our entire toolchain that is currently not using CMake, so it 
> would be more than welcome to have the entire system built with CMake.
> 
> Good job!
> 
> -Original Message-
> From: cmake-developers [mailto:cmake-developers-boun...@cmake.org]
> On Behalf Of Stuermer, Michael SP/HZA-ZSEP
> Sent: Thursday, February 25, 2016 5:52 AM
> To: Gilles Khouzam ; CMake Developers 
> 
> Subject: Re: [cmake-developers] C# support ready for review
> 
> Hi Gilles,
> 
> good to hear C# support is working not only for me and some people are 
> actually interested in it :-).
> 
> Thanks for the patch, I already added to my github. All the changes 
> make perfectly sense for me.
> 
> Let me explain a bit more about things like hardcoding LangVersion in 
> the module scripts etc. (in short, there is no reason for hardcoding 
> langversion 3):
> 
> The current C# support was developed by plain trial-and-error. I 
> started out copying the CXX compiler module scripts, finding out the 
> relevant/necessary variables, trying to find reasonable values etc. By 
> starting with a copy of the CXX scripts I am quite sure there are some 
> leftovers that do not make sense there. To adapt everything for C# I 
> started by looking at a existing .csproj file and changing the target 
> generator until everything went as expected. Initial values like the 
> flags in CMakeCSharpInformation.cmake where copied as is from my first 
> simple reference .csproj files. Also the special handling of .xaml, 
> .xaml.cs and .Designer.cs files with the  tags was just 
> introduced when I realized I need it somewhere in our new project.
> 
> Putting it all together I just want to say that the current state of 
> development leaves room for a lot of improvement and if something 
> seems like it could be done better, this is most probably the case. I 
> really only pushed it to a level where I feel it's working well enough for me 
> and I can focus on my actual job.
> 
> The part that probably needs most additional work is all the C# 
> detection and configuration part in the module scripts. I got it all 
> up and running so we can develop our C/C++/C# cross-platform software 
> here, but it's still some steps away from a perfectly configurable solution 
> where everyone could be happy.
> 
> best regards,
> Michael
> 
> 
> From: Gilles Khouzam [mailto:gilles.khou...@microsoft.com]
> Sent: Thursday, February 25, 2016 8:44 AM
> To: Stuermer, Michael SP/HZA-ZSEP; CMake Developers
> Subject: RE: C# support ready for review
> 
> Hi Michael,
> 
> Things are looking really good, I've just converted one of my personal 
> projects to using CMake in very little time.
> 
> I've included a small patch for your CSharp implementation.
> 
> The first change is to add support to specify C# 6.0 in the flag table.
> The second removes the exception handling tag and the precompiled 
> header tags since they don't make sense for C#, as well as adding a 
> space between the platform comparisons. The space is not necessary for 
> the project, but is you make any change in 

Re: [cmake-developers] FindBOOST 3.5 target

2016-03-01 Thread Nils Gladitz

On 01.03.2016 18:09, Henry Schreiner wrote:

On FindBoost.cmake (and maybe others), the new (in 3.5) targets populate the 
INTERFACE_INCLUDE_DIRECTORIES directory. Shouldn’t this be the 
INTERFACE_SYSTEM_INCLUDE_DIRECTORIES field? Since that way CMake can help keep 
Xcode and other IDE’s from claiming you have warnings in boost, etc.


All INTERFACE_INCLUDE_DIRECTORIES of IMPORTED targets are implicitly 
considered SYSTEM include directories.


Nils
--

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-developers

[cmake-developers] FindBOOST 3.5 target

2016-03-01 Thread Henry Schreiner
On FindBoost.cmake (and maybe others), the new (in 3.5) targets populate the 
INTERFACE_INCLUDE_DIRECTORIES directory. Shouldn’t this be the 
INTERFACE_SYSTEM_INCLUDE_DIRECTORIES field? Since that way CMake can help keep 
Xcode and other IDE’s from claiming you have warnings in boost, etc.

Henry
-- 

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-developers

Re: [CMake] CMAKE_THREAD_LIBS_INIT

2016-03-01 Thread Aaron Boxer
OK, figured this one out too.  Thank again, Caleb!

On Tue, Mar 1, 2016 at 10:48 AM, Aaron Boxer  wrote:

> Hello,
> I am getting link error "undefined reference to pthread_create"
>
> I have added ${CMAKE_THREAD_LIBS_INIT} in my cmake link line,
> and I have added
>
> FIND_PACKAGE(Threads REQUIRED).
>
> Here is a link to my cmake file:
>
>
> https://github.com/GrokImageCompression/opendcp/blob/master/libopendcp/CMakeLists.txt
>
> Any help would be very greatly appreciated.
>
> Thanks!
> Aaron
>
>
>
-- 

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] CMAKE_THREAD_LIBS_INIT

2016-03-01 Thread Aaron Boxer
Hello,
I am getting link error "undefined reference to pthread_create"

I have added ${CMAKE_THREAD_LIBS_INIT} in my cmake link line,
and I have added

FIND_PACKAGE(Threads REQUIRED).

Here is a link to my cmake file:

https://github.com/GrokImageCompression/opendcp/blob/master/libopendcp/CMakeLists.txt

Any help would be very greatly appreciated.

Thanks!
Aaron
-- 

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] CMAKE_DL_LIBS

2016-03-01 Thread Aaron Boxer
Thanks! I found the problem: I needed to add CMAKE_DL_LIBS to another
static library that the main exe was linking to.
Now this link error is gone.


On Tue, Mar 1, 2016 at 9:55 AM, J. Caleb Wherry 
wrote:

> That link looks fine to me. You might want to verify that the
> CMAKE_DL_LIBS variable actually contains what it should on your system (or
> a least contains what it should right before using it).
>
> You could explicitly add the "-dl" to that link statement and see if that
> works. That's what that variable should contain anyways on Linux boxes.
>
> -Caleb
>
> (Pasting off list response below)
>
> Thanks, Caleb. Are you saying that I need to add "-ldl" link lib in
> addition to ${CMAKE_DL_LIBS} ?
>
>
> My CMake file is here:
>
>
> https://github.com/GrokImageCompression/opendcp/blob/master/cli/CMakeLists.txt
>
> and the lines for the exe that is not linking are found here:
>
> TARGET_LINK_LIBRARIES(opendcp_j2k ${CMAKE_DL_LIBS} ${OPENDCP_LIB} )
>
>
> This is an open source proj, by the way. I can send you a few short lines
> about how to build on Ubuntu, if you are interested.
>
> Thanks very much for your help.
>
>
> Aaron
>
> On Tuesday, March 1, 2016, Aaron Boxer  wrote:
>
>>
>>
>> On Tue, Mar 1, 2016 at 9:06 AM, Aaron Boxer  wrote:
>>
>>> Hello!
>>> I have a CMAKE project that creates an executable that links with a
>>> static lib
>>> from a second CMAKE project. The static lib requires the dlopen and
>>> dlclose
>>> symbols.
>>>
>>> So, when I link the first project, I add ${CMAKE_DL_LIBS} to the CMake
>>> file.
>>>
>>> However, I still get an error about "undefined reference to symbol
>>> "dlclose"
>>>
>>
>> The error states: "missing DSO from command line"
>>
>> Also, the second CMAKE project also contains executables that link with
>> the static
>> library, and they link with no problem.
>>
>>
>>
>>
>>
>
> --
> Sent from my iPhone 4s
>
-- 

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-developers] [CMake 0015996]: Unable to zip files with CMake command-line tool `tar` without path prefix in zip file

2016-03-01 Thread Mantis Bug Tracker

The following issue has been SUBMITTED. 
== 
https://cmake.org/Bug/view.php?id=15996 
== 
Reported By:Marcel Metz
Assigned To:
== 
Project:CMake
Issue ID:   15996
Category:   CMake
Reproducibility:always
Severity:   minor
Priority:   normal
Status: new
== 
Date Submitted: 2016-03-01 16:35 CET
Last Modified:  2016-03-01 16:35 CET
== 
Summary:Unable to zip files with CMake command-line tool
`tar` without path prefix in zip file
Description: 
Hi,

the current implementation does not allow to package the whole content of a
directory without listing every entry in the directory.

I would expect that executing a command line like `cmake -E tar cvf
../result.zip --format=zip .` would zip the whole content of the current working
directory.  While CMake packages all the files it prepends every entry with
'./', which I don't expect compared to the `zip` tool provided with most linux
distributions.

The alternative command line `cmake -E tar cvf ../result.zip $PWD` only creates
an empty zip file.

Steps to Reproduce: 
#!/usr/bin/sh
# cmake --version
# cmake version 3.4.1

mkdir zip_root
touch zip_root/file1
touch zip_root/file2
# The whole content of 'zip_root' should be zipped, so change working directory
cd zip_root

cmake -E tar cvf ../cmake-abs.zip --format=zip $PWD
# : $? = 0

cmake -E tar cvf ../cmake-rel.zip --format=zip .
# .
# ./file1
# ./file2
# $? = 0

zip ../zip-abs.zip $PWD
#   adding: $PWD/ (stored 0%)
# $? = 0

zip ../zip-rel.zip .
# zip error: Nothing to do! (../zip-rel.zip)
# $? = 12

zip -r ../zip-abs-rec.zip $PWD
# adding: $PWD/ (stored 0%)
# adding: $PWD/file1 (stored 0%)
# adding: $PWD/file2 (stored 0%)
# $? = 0

zip -r ../zip-rel-rec.zip .
# adding: file1 (stored 0%)
# adding: file2 (stored 0%)
# $? = 0

unzip -t ../cmake-abs.zip 
# Archive:  ../cmake-abs.zip
# warning [../cmake-abs.zip]:  zipfile is empty


unzip -t ../cmake-rel.zip 
# Archive:  ../cmake-rel.zip
#testing: ./   OK
#testing: ./file1  OK
#testing: ./file2  OK
# No errors detected in compressed data of ../cmake-rel.zip.

unzip -t ../zip-abs.zip 
# Archive:  ../zip-abs.zip
#testing: $PWD/   OK
# No errors detected in compressed data of ../zip-abs.zip.

unzip -t ../zip-rel.zip 
# unzip:  cannot find or open ../zip-rel.zip, ../zip-rel.zip.zip or
../zip-rel.zip.ZIP.

unzip -t ../zip-abs-rec.zip 
# Archive:  ../zip-abs-rec.zip
#testing: $PWD/   OK
#testing: $PWD/file1   OK
#testing: $PWD/file2   OK
# No errors detected in compressed data of ../zip-abs-rec.zip.

unzip -t ../zip-rel-rec.zip 
# Archive:  ../zip-rel-rec.zip
#testing: file1OK
#testing: file2OK
# No errors detected in compressed data of ../zip-rel-rec.zip.
== 

Issue History 
Date ModifiedUsername   FieldChange   
== 
2016-03-01 16:35 Marcel MetzNew Issue
==

-- 

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-developers


Re: [CMake] CMAKE_DL_LIBS

2016-03-01 Thread J. Caleb Wherry
That link looks fine to me. You might want to verify that the CMAKE_DL_LIBS
variable actually contains what it should on your system (or a least
contains what it should right before using it).

You could explicitly add the "-dl" to that link statement and see if that
works. That's what that variable should contain anyways on Linux boxes.

-Caleb

(Pasting off list response below)

Thanks, Caleb. Are you saying that I need to add "-ldl" link lib in
addition to ${CMAKE_DL_LIBS} ?


My CMake file is here:

https://github.com/GrokImageCompression/opendcp/blob/master/cli/CMakeLists.txt

and the lines for the exe that is not linking are found here:

TARGET_LINK_LIBRARIES(opendcp_j2k ${CMAKE_DL_LIBS} ${OPENDCP_LIB} )


This is an open source proj, by the way. I can send you a few short lines
about how to build on Ubuntu, if you are interested.

Thanks very much for your help.


Aaron

On Tuesday, March 1, 2016, Aaron Boxer  wrote:

>
>
> On Tue, Mar 1, 2016 at 9:06 AM, Aaron Boxer  > wrote:
>
>> Hello!
>> I have a CMAKE project that creates an executable that links with a
>> static lib
>> from a second CMAKE project. The static lib requires the dlopen and
>> dlclose
>> symbols.
>>
>> So, when I link the first project, I add ${CMAKE_DL_LIBS} to the CMake
>> file.
>>
>> However, I still get an error about "undefined reference to symbol
>> "dlclose"
>>
>
> The error states: "missing DSO from command line"
>
> Also, the second CMAKE project also contains executables that link with
> the static
> library, and they link with no problem.
>
>
>
>
>

-- 
Sent from my iPhone 4s
-- 

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] CMAKE_DL_LIBS

2016-03-01 Thread J. Caleb Wherry
Most likely solution: missing the "-ldl" link lib which should solve
your missing symbol issues.

The DSO error is most likely caused by the above. However, there could be a
problem with your linking order. I'd have to see the CMake file to be sure.

Caleb

On Tuesday, March 1, 2016, Aaron Boxer  wrote:

>
>
> On Tue, Mar 1, 2016 at 9:06 AM, Aaron Boxer  > wrote:
>
>> Hello!
>> I have a CMAKE project that creates an executable that links with a
>> static lib
>> from a second CMAKE project. The static lib requires the dlopen and
>> dlclose
>> symbols.
>>
>> So, when I link the first project, I add ${CMAKE_DL_LIBS} to the CMake
>> file.
>>
>> However, I still get an error about "undefined reference to symbol
>> "dlclose"
>>
>
> The error states: "missing DSO from command line"
>
> Also, the second CMAKE project also contains executables that link with
> the static
> library, and they link with no problem.
>
>
>
>
>

-- 
Sent from my iPhone 4s
-- 

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] CMAKE_DL_LIBS

2016-03-01 Thread Aaron Boxer
Hello!
I have a CMAKE project that creates an executable that links with a static
lib
from a second CMAKE project. The static lib requires the dlopen and dlclose
symbols.

So, when I link the first project, I add ${CMAKE_DL_LIBS} to the CMake file.

However, I still get an error about "undefined reference to symbol
"dlclose"

I am using CMake 3.2.2.

Any ideas ?

Thanks,
Aaron
-- 

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] CMAKE_DL_LIBS

2016-03-01 Thread Aaron Boxer
On Tue, Mar 1, 2016 at 9:06 AM, Aaron Boxer  wrote:

> Hello!
> I have a CMAKE project that creates an executable that links with a static
> lib
> from a second CMAKE project. The static lib requires the dlopen and dlclose
> symbols.
>
> So, when I link the first project, I add ${CMAKE_DL_LIBS} to the CMake
> file.
>
> However, I still get an error about "undefined reference to symbol
> "dlclose"
>

The error states: "missing DSO from command line"

Also, the second CMAKE project also contains executables that link with the
static
library, and they link with no problem.
-- 

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-developers] [CMake 0015995]: GHS Multi Generator: add_custom_command / add_custom_target does not work

2016-03-01 Thread Mantis Bug Tracker

The following issue has been SUBMITTED. 
== 
https://cmake.org/Bug/view.php?id=15995 
== 
Reported By:stw_sesa
Assigned To:
== 
Project:CMake
Issue ID:   15995
Category:   CMake
Reproducibility:always
Severity:   major
Priority:   normal
Status: new
== 
Date Submitted: 2016-03-01 07:42 EST
Last Modified:  2016-03-01 07:42 EST
== 
Summary:GHS Multi Generator: add_custom_command /
add_custom_target does not work
Description: 
The GHS Multi Generator does not handle custom commands added via 
add_custom_command() correctly / at all. The custom commands are not used in the
generated project files and never executed.
Instead the default compiler seems to be called, which obviously fails.

Steps to Reproduce: 
Create a simple CMakeLists.txt like this:

# CMakeLists.txt
cmake_minimum_required (VERSION 2.8)
add_custom_target (a_txt ALL DEPENDS a.txt)
add_custom_command (OUTPUT a.txt COMMAND type b.txt > a.txt DEPENDS b.txt)
add_custom_command (OUTPUT b.txt COMMAND type c.txt > b.txt DEPENDS c.txt)
file(WRITE ${CMAKE_BINARY_DIR}/c.txt "hello world" )

---

Generate the GHC Project using CMake and try to build it.
Output from the build:

Building D:\cmake-ghc\build\custom_target_test_ghc\default.gpj
Output from Linking a_txt.gpj:

ccintarm: Error: output file 'a_txt' is a directory.

Error: build failed
Build failed (Tue Mar 01 13:32:50 2016)
== 

Issue History 
Date ModifiedUsername   FieldChange   
== 
2016-03-01 07:42 stw_sesa   New Issue
==

-- 

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-developers


[Cmake-commits] CMake branch, next, updated. v3.5.0-rc3-315-gcc20b98

2016-03-01 Thread Nils Gladitz
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
   via  cc20b98859ecfaafe607d2bc2075ef71dde4a07d (commit)
   via  d4482dd9c9a5bb7e817ffe38941760d0492ad0d9 (commit)
   via  3cc22dffb766f1e6ef90c3809d5954b14106b61d (commit)
   via  26d615ad9ff58e1cae3b605efeb0cd1b6823622a (commit)
  from  84a28fb506bbb398eab98c3524c050adc43acd6d (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=cc20b98859ecfaafe607d2bc2075ef71dde4a07d
commit cc20b98859ecfaafe607d2bc2075ef71dde4a07d
Merge: 84a28fb d4482dd
Author: Nils Gladitz 
AuthorDate: Tue Mar 1 03:53:16 2016 -0500
Commit: CMake Topic Stage 
CommitDate: Tue Mar 1 03:53:16 2016 -0500

Merge topic 'wix-module-fixes' into next

d4482dd9 CPackWIX: Support binary-only WiX installations
3cc22dff CMake Nightly Date Stamp
26d615ad CMake Nightly Date Stamp


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d4482dd9c9a5bb7e817ffe38941760d0492ad0d9
commit d4482dd9c9a5bb7e817ffe38941760d0492ad0d9
Author: Marc Chevrier 
AuthorDate: Tue Mar 1 09:49:37 2016 +0100
Commit: Nils Gladitz 
CommitDate: Tue Mar 1 09:50:46 2016 +0100

CPackWIX: Support binary-only WiX installations

Also fix URLUPDATEINFO -> ARPURLUPDATEINFO reference
in CPACK_WIX_PROPERTY_ examples.

Reviewed-by: Nils Gladitz 

diff --git a/Modules/CPackWIX.cmake b/Modules/CPackWIX.cmake
index 4994005..3c90561 100644
--- a/Modules/CPackWIX.cmake
+++ b/Modules/CPackWIX.cmake
@@ -234,7 +234,7 @@
 #  * ARPCOMMENTS - Comments
 #  * ARPHELPLINK - Help and support information URL
 #  * ARPURLINFOABOUT - General information URL
-#  * URLUPDATEINFO - Update information URL
+#  * ARPURLUPDATEINFO - Update information URL
 #  * ARPHELPTELEPHONE - Help and support telephone number
 #  * ARPSIZE - Size (in kilobytes) of the application
 
@@ -256,14 +256,14 @@ if(NOT CPACK_WIX_ROOT)
 endif()
 
 find_program(CPACK_WIX_CANDLE_EXECUTABLE candle
-  PATHS "${CPACK_WIX_ROOT}/bin")
+  PATHS "${CPACK_WIX_ROOT}" PATH_SUFFIXES "bin")
 
 if(NOT CPACK_WIX_CANDLE_EXECUTABLE)
   message(FATAL_ERROR "Could not find the WiX candle executable.")
 endif()
 
 find_program(CPACK_WIX_LIGHT_EXECUTABLE light
-  PATHS "${CPACK_WIX_ROOT}/bin")
+  PATHS "${CPACK_WIX_ROOT}" PATH_SUFFIXES "bin")
 
 if(NOT CPACK_WIX_LIGHT_EXECUTABLE)
   message(FATAL_ERROR "Could not find the WiX light executable.")

---

Summary of changes:
 Modules/CPackWIX.cmake|6 +++---
 Source/CMakeVersion.cmake |2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)


hooks/post-receive
-- 
CMake
___
Cmake-commits mailing list
Cmake-commits@cmake.org
http://public.kitware.com/mailman/listinfo/cmake-commits


Re: [cmake-developers] C# support ready for review

2016-03-01 Thread Stuermer, Michael SP/HZA-ZSEP
Ok, this leads me to the question: what is needed/missing for acceptance to 
'master'? More Documentation? More Tests? What features have to be provided by 
the module scripts? Probably some code formatting (I surely missed some 
indentation stuff and tabs instead of spaces)...

I am currently facing the problem that everything works well for me and I don't 
know what features would be required by others to work with the module. I got 
two points:

 - make LangVersion configurable
 - detect MSBuild from registry

Are there additional things missing for general use of the C# support?

best regards,
Michael

> -Original Message-
> From: Robert Goulet [mailto:robert.gou...@autodesk.com]
> Sent: Monday, February 29, 2016 3:16 PM
> To: Stuermer, Michael SP/HZA-ZSEP; Gilles Khouzam; CMake Developers
> Subject: RE: C# support ready for review
> 
> As soon as this is merged in 'master' I will give it a try. We are extremely
> interested to have C# support in CMake. That is the last piece of our entire
> toolchain that is currently not using CMake, so it would be more than
> welcome to have the entire system built with CMake.
> 
> Good job!
> 
> -Original Message-
> From: cmake-developers [mailto:cmake-developers-boun...@cmake.org]
> On Behalf Of Stuermer, Michael SP/HZA-ZSEP
> Sent: Thursday, February 25, 2016 5:52 AM
> To: Gilles Khouzam ; CMake Developers
> 
> Subject: Re: [cmake-developers] C# support ready for review
> 
> Hi Gilles,
> 
> good to hear C# support is working not only for me and some people are
> actually interested in it :-).
> 
> Thanks for the patch, I already added to my github. All the changes make
> perfectly sense for me.
> 
> Let me explain a bit more about things like hardcoding LangVersion in the
> module scripts etc. (in short, there is no reason for hardcoding langversion 
> 3):
> 
> The current C# support was developed by plain trial-and-error. I started out
> copying the CXX compiler module scripts, finding out the relevant/necessary
> variables, trying to find reasonable values etc. By starting with a copy of 
> the
> CXX scripts I am quite sure there are some leftovers that do not make sense
> there. To adapt everything for C# I started by looking at a existing .csproj 
> file
> and changing the target generator until everything went as expected. Initial
> values like the flags in CMakeCSharpInformation.cmake where copied as is
> from my first simple reference .csproj files. Also the special handling of 
> .xaml,
> .xaml.cs and .Designer.cs files with the  tags was just
> introduced when I realized I need it somewhere in our new project.
> 
> Putting it all together I just want to say that the current state of 
> development
> leaves room for a lot of improvement and if something seems like it could be
> done better, this is most probably the case. I really only pushed it to a 
> level
> where I feel it's working well enough for me and I can focus on my actual job.
> 
> The part that probably needs most additional work is all the C# detection and
> configuration part in the module scripts. I got it all up and running so we 
> can
> develop our C/C++/C# cross-platform software here, but it's still some steps
> away from a perfectly configurable solution where everyone could be happy.
> 
> best regards,
> Michael
> 
> 
> From: Gilles Khouzam [mailto:gilles.khou...@microsoft.com]
> Sent: Thursday, February 25, 2016 8:44 AM
> To: Stuermer, Michael SP/HZA-ZSEP; CMake Developers
> Subject: RE: C# support ready for review
> 
> Hi Michael,
> 
> Things are looking really good, I've just converted one of my personal
> projects to using CMake in very little time.
> 
> I've included a small patch for your CSharp implementation.
> 
> The first change is to add support to specify C# 6.0 in the flag table.
> The second removes the exception handling tag and the precompiled header
> tags since they don't make sense for C#, as well as adding a space between
> the platform comparisons. The space is not necessary for the project, but is
> you make any change in the property page inside of VS, a new property
> group is created instead of modifying the existing one. While this would not
> be a typical CMake scenario, it might be better to stay consistent with how
> VS and MSBuild process the file.
> 
> The next thing that I want to start looking at, is to make this work for
> Windows Phone and Windows Store apps, so that it can match the support
> that we have with C++ in this regards.
> 
> From: Gilles Khouzam
> Sent: Wednesday, February 24, 2016 14:47
> To: 'Stuermer, Michael SP/HZA-ZSEP' ;
> CMake Developers 
> Subject: RE: C# support ready for review
> 
> Hi Michael,
> 
> I've had more time to try this, what is the reasoning to hardcode the default
> LangVersion to 3 in Modules\CMakeCSharpInformation.cmake? Can we
> remove it? I'm trying this on some projects of 

[cmake-developers] [PATCH] FindProtobuf: variable case matches module name

2016-03-01 Thread Antonio Perez Barrero
Use recommended case for variable names. i.e. matching name of the
module as passed to `find_package`.

For backwards compatibility, the upper case versions of both input and
output variables are used and defined when appropriate.
---
 Modules/FindProtobuf.cmake| 179 --
 Tests/CMakeOnly/AllFindModules/CMakeLists.txt |   2 +-
 2 files changed, 114 insertions(+), 67 deletions(-)

diff --git a/Modules/FindProtobuf.cmake b/Modules/FindProtobuf.cmake
index 95e3b1e..9b11ffa 100644
--- a/Modules/FindProtobuf.cmake
+++ b/Modules/FindProtobuf.cmake
@@ -6,51 +6,51 @@
 #
 # The following variables can be set and are optional:
 #
-# ``PROTOBUF_SRC_ROOT_FOLDER``
+# ``Protobuf_SRC_ROOT_FOLDER``
 #   When compiling with MSVC, if this cache variable is set
 #   the protobuf-default VS project build locations
 #   (vsprojects/Debug and vsprojects/Release
 #   or vsprojects/x64/Debug and vsprojects/x64/Release)
 #   will be searched for libraries and binaries.
-# ``PROTOBUF_IMPORT_DIRS``
+# ``Protobuf_IMPORT_DIRS``
 #   List of additional directories to be searched for
 #   imported .proto files.
-# ``PROTOBUF_DEBUG``
+# ``Protobuf_DEBUG``
 #   Show debug messages.
 #
 # Defines the following variables:
 #
-# ``PROTOBUF_FOUND``
+# ``Protobuf_FOUND``
 #   Found the Google Protocol Buffers library
 #   (libprotobuf & header files)
-# ``PROTOBUF_VERSION``
+# ``Protobuf_VERSION``
 #   Version of package found.
-# ``PROTOBUF_INCLUDE_DIRS``
+# ``Protobuf_INCLUDE_DIRS``
 #   Include directories for Google Protocol Buffers
-# ``PROTOBUF_LIBRARIES``
+# ``Protobuf_LIBRARIES``
 #   The protobuf libraries
-# ``PROTOBUF_PROTOC_LIBRARIES``
+# ``Protobuf_PROTOC_LIBRARIES``
 #   The protoc libraries
-# ``PROTOBUF_LITE_LIBRARIES``
+# ``Protobuf_LITE_LIBRARIES``
 #   The protobuf-lite libraries
 #
 # The following cache variables are also available to set or use:
 #
-# ``PROTOBUF_LIBRARY``
+# ``Protobuf_LIBRARY``
 #   The protobuf library
-# ``PROTOBUF_PROTOC_LIBRARY``
+# ``Protobuf_PROTOC_LIBRARY``
 #   The protoc library
-# ``PROTOBUF_INCLUDE_DIR``
+# ``Protobuf_INCLUDE_DIR``
 #   The include directory for protocol buffers
-# ``PROTOBUF_PROTOC_EXECUTABLE``
+# ``Protobuf_PROTOC_EXECUTABLE``
 #   The protoc compiler
-# ``PROTOBUF_LIBRARY_DEBUG``
+# ``Protobuf_LIBRARY_DEBUG``
 #   The protobuf library (debug)
-# ``PROTOBUF_PROTOC_LIBRARY_DEBUG``
+# ``Protobuf_PROTOC_LIBRARY_DEBUG``
 #   The protoc library (debug)
-# ``PROTOBUF_LITE_LIBRARY``
+# ``Protobuf_LITE_LIBRARY``
 #   The protobuf lite library
-# ``PROTOBUF_LITE_LIBRARY_DEBUG``
+# ``Protobuf_LITE_LIBRARY_DEBUG``
 #   The protobuf lite library (debug)
 #
 # Example:
@@ -58,12 +58,12 @@
 # .. code-block:: cmake
 #
 #   find_package(Protobuf REQUIRED)
-#   include_directories(${PROTOBUF_INCLUDE_DIRS})
+#   include_directories(${Protobuf_INCLUDE_DIRS})
 #   include_directories(${CMAKE_CURRENT_BINARY_DIR})
 #   protobuf_generate_cpp(PROTO_SRCS PROTO_HDRS foo.proto)
 #   protobuf_generate_python(PROTO_PY foo.proto)
 #   add_executable(bar bar.cc ${PROTO_SRCS} ${PROTO_HDRS})
-#   target_link_libraries(bar ${PROTOBUF_LIBRARIES})
+#   target_link_libraries(bar ${Protobuf_LIBRARIES})
 #
 # .. note::
 #   The ``protobuf_generate_cpp`` and ``protobuf_generate_python``
@@ -129,8 +129,8 @@ function(PROTOBUF_GENERATE_CPP SRCS HDRS)
 set(_protobuf_include_path -I ${CMAKE_CURRENT_SOURCE_DIR})
   endif()
 
-  if(DEFINED PROTOBUF_IMPORT_DIRS)
-foreach(DIR ${PROTOBUF_IMPORT_DIRS})
+  if(DEFINED Protobuf_IMPORT_DIRS)
+foreach(DIR ${Protobuf_IMPORT_DIRS})
   get_filename_component(ABS_PATH ${DIR} ABSOLUTE)
   list(FIND _protobuf_include_path ${ABS_PATH} _contains_already)
   if(${_contains_already} EQUAL -1)
@@ -151,9 +151,9 @@ function(PROTOBUF_GENERATE_CPP SRCS HDRS)
 add_custom_command(
   OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${FIL_WE}.pb.cc"
  "${CMAKE_CURRENT_BINARY_DIR}/${FIL_WE}.pb.h"
-  COMMAND  ${PROTOBUF_PROTOC_EXECUTABLE}
+  COMMAND  ${Protobuf_PROTOC_EXECUTABLE}
   ARGS --cpp_out  ${CMAKE_CURRENT_BINARY_DIR} ${_protobuf_include_path} 
${ABS_FIL}
-  DEPENDS ${ABS_FIL} ${PROTOBUF_PROTOC_EXECUTABLE}
+  DEPENDS ${ABS_FIL} ${Protobuf_PROTOC_EXECUTABLE}
   COMMENT "Running C++ protocol buffer compiler on ${FIL}"
   VERBATIM )
   endforeach()
@@ -183,8 +183,8 @@ function(PROTOBUF_GENERATE_PYTHON SRCS)
 set(_protobuf_include_path -I ${CMAKE_CURRENT_SOURCE_DIR})
   endif()
 
-  if(DEFINED PROTOBUF_IMPORT_DIRS)
-foreach(DIR ${PROTOBUF_IMPORT_DIRS})
+  if(DEFINED Protobuf_IMPORT_DIRS)
+foreach(DIR ${Protobuf_IMPORT_DIRS})
   get_filename_component(ABS_PATH ${DIR} ABSOLUTE)
   list(FIND _protobuf_include_path ${ABS_PATH} _contains_already)
   if(${_contains_already} EQUAL -1)
@@ -201,8 +201,8 @@ function(PROTOBUF_GENERATE_PYTHON SRCS)
 list(APPEND ${SRCS} "${CMAKE_CURRENT_BINARY_DIR}/${FIL_WE}_pb2.py")
 add_custom_command(
   OUTPUT