On 05/26/2010 01:59 PM, Torri, Stephen CIV NSWCDD, W15 wrote:
From: Ryan Pavlik [mailto:[email protected]]
Sent: Wed 5/26/2010 2:42 PM
To: Torri, Stephen CIV NSWCDD, W15; [email protected]
Subject: Re: [CMake] Help creating a module for detecting mysql-connector-c++



Didn't test it, just ran it through my cleanup software and then tweaked
it a bit by hand.  Hopefully this should help - at the very least it
will be more readable and standardized.

With this, you should just be able to set a MYSQLCONNECTORCPP_ROOT_DIR
and have it find the rest properly and automatically, marking as
advanced when possible.

Ryan


________________________________

Would an example be like?

IF(WIN32)

     set(MYSQLCONNECTORCPP_ROOT_DIR "C:");

ELSE(WIN32)

     set(MYSQLCONNECTORCPP_ROOT_DIR "/");

ENDIF(WIN32)

find_package(MysqlConnectorCpp REQUIRED)

Stephen

No, the "ROOT_DIR" variables are to be set by the user at configure time - let's say you installed something into a weird directory, you'd like to be able to tell it where to find it. You wouldn't generally set it in your cmakelists.txt, except if you know a relative location (for example, there is no PARTB_ROOT_DIR set, but it's always bundled with PARTA, and you have a PARTA_ROOT_DIR, you might consider setting PARTB_ROOT_DIR to be the value of PARTA_ROOT_DIR)

Ryan

--
Ryan Pavlik
HCI Graduate Student
Virtual Reality Applications Center
Iowa State University

[email protected]
http://academic.cleardefinition.com

_______________________________________________
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

Reply via email to