summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMathieu Malaterre <mathieu.malaterre@gmail.com>2006-03-10 20:08:40 (GMT)
committerMathieu Malaterre <mathieu.malaterre@gmail.com>2006-03-10 20:08:40 (GMT)
commitfe66b15da4fa8060abb191235ef2450b9dca82bf (patch)
tree78d8cf2849fc4b08365060778849f8c024ab132a
parent862f5df25c509e2df59d00597b0c4b4d14cf5eaa (diff)
downloadCMake-fe66b15da4fa8060abb191235ef2450b9dca82bf.zip
CMake-fe66b15da4fa8060abb191235ef2450b9dca82bf.tar.gz
CMake-fe66b15da4fa8060abb191235ef2450b9dca82bf.tar.bz2
BUG: Fix problem with in the path
-rw-r--r--Source/kwsys/CMakeLists.txt1
-rw-r--r--Source/kwsys/testDynamicLoader.cxx7
-rw-r--r--Source/kwsys/testSystemTools.h.in2
3 files changed, 7 insertions, 3 deletions
diff --git a/Source/kwsys/CMakeLists.txt b/Source/kwsys/CMakeLists.txt
index faae76f..6771d26 100644
--- a/Source/kwsys/CMakeLists.txt
+++ b/Source/kwsys/CMakeLists.txt
@@ -516,7 +516,6 @@ IF(KWSYS_C_SRCS OR KWSYS_CXX_SRCS)
# If kwsys contains the DynamicLoader, need extra library
IF(KWSYS_USE_DynamicLoader)
ADD_LIBRARY(testDynload MODULE testDynload.c)
- GET_TARGET_PROPERTY(TEST_DYNLOAD_LOCATION testDynload LOCATION)
IF(UNIX)
TARGET_LINK_LIBRARIES(${KWSYS_NAMESPACE} ${CMAKE_DL_LIBS})
ENDIF(UNIX)
diff --git a/Source/kwsys/testDynamicLoader.cxx b/Source/kwsys/testDynamicLoader.cxx
index 1d2841a..2719fa1 100644
--- a/Source/kwsys/testDynamicLoader.cxx
+++ b/Source/kwsys/testDynamicLoader.cxx
@@ -31,6 +31,11 @@ kwsys_stl::string GetLibName(const char* lname)
{
// Construct proper name of lib
kwsys_stl::string slname;
+ slname = EXECUTABLE_OUTPUT_PATH;
+#ifdef CMAKE_INTDIR
+ slname += CMAKE_INTDIR;
+ slname += "/";
+#endif
slname = kwsys::DynamicLoader::LibPrefix();
slname += lname;
slname += kwsys::DynamicLoader::LibExtension();
@@ -86,7 +91,7 @@ int main(int , char *[])
res += TestDynamicLoader("libdl.so", "TestDynamicLoader",1,0,1);
#endif
// Now try on the generated library
- kwsys_stl::string libname = TEST_DYNLOAD_LOCATION; //GetLibName("testDynload");
+ kwsys_stl::string libname = GetLibName("testDynload");
res += TestDynamicLoader(libname.c_str(), "dummy",1,0,1);
res += TestDynamicLoader(libname.c_str(), "TestDynamicLoaderFunction",1,1,1);
res += TestDynamicLoader(libname.c_str(), "_TestDynamicLoaderFunction",1,0,1);
diff --git a/Source/kwsys/testSystemTools.h.in b/Source/kwsys/testSystemTools.h.in
index cdccfbb..1b2cd39 100644
--- a/Source/kwsys/testSystemTools.h.in
+++ b/Source/kwsys/testSystemTools.h.in
@@ -14,7 +14,7 @@
#ifndef @KWSYS_NAMESPACE@_testSystemtools_h
#define @KWSYS_NAMESPACE@_testSystemtools_h
-#define TEST_DYNLOAD_LOCATION "@TEST_DYNLOAD_LOCATION@"
+#define EXECUTABLE_OUTPUT_PATH "@EXECUTABLE_OUTPUT_PATH@"
#define TEST_SYSTEMTOOLS_BIN_FILE "@TEST_SYSTEMTOOLS_BIN_FILE@"
#define TEST_SYSTEMTOOLS_SRC_FILE "@TEST_SYSTEMTOOLS_SRC_FILE@"