BUG: fix for bug 2322, use CMAKE_EXECUTABLE_SUFFIX variable for exe suffix

This commit is contained in:
Bill Hoffman 2006-01-02 13:37:53 -05:00
parent 1c289b52f4
commit 86ad253427
5 changed files with 5 additions and 4 deletions

View File

@ -4,6 +4,7 @@ SET(CMAKE_STATIC_LIBRARY_PREFIX "lib")
SET(CMAKE_STATIC_LIBRARY_SUFFIX ".a")
SET(CMAKE_SHARED_LIBRARY_PREFIX "lib") # lib
SET(CMAKE_SHARED_LIBRARY_SUFFIX ".so") # .so
SET(CMAKE_EXECUTABLE_SUFFIX "") # .exe
SET(CMAKE_DL_LIBS "-ldl")
SET(CMAKE_SHARED_LIBRARY_C_FLAGS "") # -pic
SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared") # -shared

View File

@ -3,6 +3,7 @@ SET(CMAKE_STATIC_LIBRARY_PREFIX "lib")
SET(CMAKE_STATIC_LIBRARY_SUFFIX ".a")
SET(CMAKE_SHARED_LIBRARY_PREFIX "lib") # lib
SET(CMAKE_SHARED_LIBRARY_SUFFIX ".dll") # .so
SET(CMAKE_EXECUTABLE_SUFFIX ".exe") # .exe
SET(CMAKE_SHARED_MODULE_PREFIX "lib") # lib
SET(CMAKE_SHARED_MODULE_SUFFIX ".dll") # .so
SET(CMAKE_DL_LIBS "")

View File

@ -5,6 +5,7 @@ SET(CMAKE_SHARED_LIBRARY_PREFIX "lib") # lib
SET(CMAKE_SHARED_LIBRARY_SUFFIX ".dll") # .so
SET(CMAKE_SHARED_MODULE_PREFIX "lib") # lib
SET(CMAKE_SHARED_MODULE_SUFFIX ".dll") # .so
SET(CMAKE_EXECUTABLE_SUFFIX ".exe") # .exe
SET(CMAKE_DL_LIBS "")
SET(CMAKE_SHARED_LIBRARY_C_FLAGS "") # -pic
SET(CMAKE_SHARED_LIBRARY_CXX_FLAGS "") # -pic

View File

@ -2,6 +2,7 @@ SET(CMAKE_STATIC_LIBRARY_PREFIX "")
SET(CMAKE_STATIC_LIBRARY_SUFFIX ".lib")
SET(CMAKE_SHARED_LIBRARY_PREFIX "") # lib
SET(CMAKE_SHARED_LIBRARY_SUFFIX ".dll") # .so
SET(CMAKE_EXECUTABLE_SUFFIX ".exe") # .exe
SET(CMAKE_LINK_LIBRARY_SUFFIX ".lib")
SET(CMAKE_DL_LIBS "")

View File

@ -914,6 +914,7 @@ const char* cmTarget::GetSuffixVariableInternal(TargetType type)
case cmTarget::MODULE_LIBRARY:
return "CMAKE_SHARED_MODULE_SUFFIX";
case cmTarget::EXECUTABLE:
return "CMAKE_EXECUTABLE_SUFFIX";
case cmTarget::UTILITY:
case cmTarget::INSTALL_FILES:
case cmTarget::INSTALL_PROGRAMS:
@ -956,10 +957,6 @@ std::string cmTarget::GetFullNameInternal(TargetType type)
{
const char* targetPrefix = this->GetProperty("PREFIX");
const char* targetSuffix = this->GetProperty("SUFFIX");
if(!targetSuffix && type == cmTarget::EXECUTABLE)
{
targetSuffix = cmSystemTools::GetExecutableExtension();
}
const char* prefixVar = this->GetPrefixVariableInternal(type);
const char* suffixVar = this->GetSuffixVariableInternal(type);
const char* ll =