[CMake] Can't configure Perl on Windows

Tron Thomas tron.thomas at verizon.net
Thu Nov 27 18:14:13 EST 2008


When I remove the PATHS entry from the find_library library, CMake 
succeeds.  This is because I have Cygwin installed, and CMake finds the 
perl executable in the Cygwin installation.  Cygwin is not required for 
the project I'm trying to develop, and I don't want to force someone to 
install it for configuring the project on their system.

What can I do so I can test how well this configuration will work on a 
system that does not have Cygwin installed?

Alexander Neundorf wrote:
> On Thursday 27 November 2008, Tron Thomas wrote:
>   
>>  Since Perl is not typically included with Windows, I am including the
>> Windows version in the source tree.  The relevant CMake code goes something
>> like this:
>>
>>  cmake_minimum_required(VERSION 2.6)
>>
>>  project(MyProject)
>>
>>  enable_testing()
>>
>>  find_package(Perl REQUIRED PATHS ${CMAKE_SOURCE_DIR}/<Path to Perl>)
>>     
>
> Try without the "PATHS ${CMAKE_SOURCE_DIR}/<Path to Perl>" arguments, and if 
> perl is not found, set the environment variable CMAKE_PREFIX_PATH to the root 
> directory of the perl installation (setting the cmake variable 
> CMAKE_PREFIX_PATH should also work).
> Let me know if this helps.
>
> Alex
>
>
>   




More information about the CMake mailing list