Commit fe66b15d authored by Mathieu Malaterre's avatar Mathieu Malaterre
Browse files

BUG: Fix problem with in the path

parent 862f5df2
......@@ -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)
......
......@@ -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);
......
......@@ -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@"
......
Supports Markdown
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