Commit 8798d527 authored by Bill Hoffman's avatar Bill Hoffman
Browse files

ENH: add support for X11

parent 05d4b9aa
......@@ -6,20 +6,24 @@ SET (CMAKE_WORDS_BIGENDIAN @CMAKE_WORDS_BIGENDIAN@ )
SET (CMAKE_USE_SPROC @CMAKE_USE_SPROC@ CACHE_NO_REPLACE BOOL)
SET (CMAKE_USE_PTHREADS @CMAKE_USE_PTHREADS@ CACHE_NO_REPLACE BOOL)
SET (CMAKE_HP_PTHREADS @CMAKE_HP_PTHREADS@ CACHE_NO_REPLACE BOOL)
SET (CMAKE_LIB_EXT @CMAKE_LIB_EXT@ CACHE_NO_REPLACE STRING)
SET (CMAKE_RANLIB "@RANLIB@" CACHE_NO_REPLACE STRING)
SET (CMAKE_AR "@CMAKE_AR@" CACHE_NO_REPLACE STRING)
SET (CMAKE_LIB_EXT @CMAKE_LIB_EXT@ CACHE_NO_REPLACE )
SET (CMAKE_RANLIB "@RANLIB@" CACHE_NO_REPLACE )
SET (CMAKE_AR "@CMAKE_AR@" CACHE_NO_REPLACE )
SET (CMAKE_CXX_COMPILER "@CXX@" CACHE_NO_REPLACE FILEPATH)
SET (CMAKE_CXX_FLAGS "@CXXFLAGS@" CACHE_NO_REPLACE STRING)
SET (CMAKE_TEMPLATE_FLAGS "@CMAKE_TEMPLATE_FLAGS@" CACHE_NO_REPLACE STRING)
SET (CMAKE_CXX_FLAGS "@CXXFLAGS@" CACHE_NO_REPLACE )
SET (CMAKE_TEMPLATE_FLAGS "@CMAKE_TEMPLATE_FLAGS@" CACHE_NO_REPLACE )
SET (CMAKE_C_COMPILER "@CC@" CACHE_NO_REPLACE FILEPATH)
SET (CMAKE_C_FLAGS "@CFLAGS@" CACHE_NO_REPLACE STRING)
SET (CMAKE_SHLIB_CFLAGS "@CMAKE_SHLIB_CFLAGS@" CACHE_NO_REPLACE STRING)
SET (CMAKE_SHLIB_BUILD_FLAGS "@CMAKE_SHLIB_BUILD_FLAGS@" CACHE_NO_REPLACE STRING)
SET (CMAKE_SHLIB_SUFFIX @CMAKE_SHLIB_SUFFIX@ CACHE_NO_REPLACE STRING)
SET (CMAKE_THREAD_LIBS "@CMAKE_THREAD_LIBS@" CACHE_NO_REPLACE STRING)
SET (CMAKE_DL_LIBS "@CMAKE_DL_LIBS@" CACHE_NO_REPLACE STRING)
SET (CMAKE_SHLIB_LINK_FLAGS "@CMAKE_SHLIB_LINK_FLAGS@" CACHE_NO_REPLACE STRING)
SET (CMAKE_SHLIB_LD_LIBS "@CMAKE_SHLIB_LD_LIBS@" CACHE_NO_REPLACE STRING)
SET (CMAKE_SHLIB_LD_LIBS "@CMAKE_SHLIB_LD_LIBS@" CACHE_NO_REPLACE_NO_REPLACE STRING)
SET (CMAKE_C_FLAGS "@CFLAGS@" CACHE_NO_REPLACE )
SET (CMAKE_SHLIB_CFLAGS "@CMAKE_SHLIB_CFLAGS@" CACHE_NO_REPLACE )
SET (CMAKE_SHLIB_BUILD_FLAGS "@CMAKE_SHLIB_BUILD_FLAGS@" CACHE_NO_REPLACE )
SET (CMAKE_SHLIB_SUFFIX @CMAKE_SHLIB_SUFFIX@ CACHE_NO_REPLACE )
SET (CMAKE_THREAD_LIBS "@CMAKE_THREAD_LIBS@" CACHE_NO_REPLACE )
SET (CMAKE_DL_LIBS "@CMAKE_DL_LIBS@" CACHE_NO_REPLACE )
SET (CMAKE_SHLIB_LINK_FLAGS "@CMAKE_SHLIB_LINK_FLAGS@" CACHE_NO_REPLACE )
SET (CMAKE_SHLIB_LD_LIBS "@CMAKE_SHLIB_LD_LIBS@" CACHE_NO_REPLACE )
SET (CMAKE_SHLIB_LD_LIBS "@CMAKE_SHLIB_LD_LIBS@" CACHE_NO_REPLACE_NO_REPLACE )
# support for X11
SET (CMAKE_X_LIBS "@X_PRE_LIBS@ @X_LIBS@ -lX11 @X_EXTRA_LIBS@" CACHE_NO_REPLACE )
SET (CMAKE_X_CFLAGS "@X_CFLAGS@" CACHE_NO_REPLACE)
SET (CMAKE_HAS_X "@CMAKE_HAS_X@" CACHE_NO_REPLACE)
......@@ -267,7 +267,9 @@ void cmUnixMakefileGenerator::OutputLinkLibraries(std::ostream& fout,
// if a variable expands to nothing.
if (lib->first.size() == 0) continue;
// if it is a full path break it into -L and -l
if(lib->first.find('/') != std::string::npos)
cmRegularExpression reg("(^[ \t]*\\-l)|(\\${)");
if(lib->first.find('/') != std::string::npos
&& !reg.find(lib->first))
{
std::string dir, file;
cmSystemTools::SplitProgramPath(lib->first.c_str(),
......@@ -286,9 +288,7 @@ void cmUnixMakefileGenerator::OutputLinkLibraries(std::ostream& fout,
// not a full path, so add -l name
else
{
std::string::size_type pos = lib->first.find("-l");
if((pos == std::string::npos || pos > 0)
&& lib->first.find("${") == std::string::npos)
if(!reg.find(lib->first))
{
librariesLinked += "-l";
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment