Anonymous avatar Anonymous committed 48f5a5c

Rename the output as libfilefind.so instead of liblibfilefind.so.

I didn't like the double-lib.

Comments (0)

Files changed (1)

libfilefind/c_glib_based/CMakeLists.txt

     STRING(REGEX REPLACE "[\r\n]+$" "" ${VAR} "${${VAR}}")
 ENDMACRO(CHOMP)
 
+SET(MYNAME "filefind")
 SET(DEBUG "" CACHE BOOL "Add debugging information")
 # This is the equivalent to perform a "make dist"/"make distdir" etc.
-SET(CPACK_PACKAGE_NAME "libfilefind")
+SET(CPACK_PACKAGE_NAME "lib${MYNAME}")
 SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "A C Library for Traversing a Directory Recursively")
 SET(CPACK_PACKAGE_VENDOR "Shlomi Fish")
 SET(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README")
 
 ADD_DEFINITIONS(${GLIB2_CFLAGS})
 
-ADD_LIBRARY (libfilefind
+SET (LIBNAME "${MYNAME}")
+ADD_LIBRARY ("${LIBNAME}"
     SHARED
     ${FILEFIND_MODULES}
     )
 
-LIST (APPEND PTHREAD_RWLOCK_FCFS_LIBS "libfilefind")
+LIST (APPEND PTHREAD_RWLOCK_FCFS_LIBS "${LIBNAME}")
 IF (${BUILD_STATIC_LIBRARY})
-    ADD_LIBRARY (libfilefind-static
+    SET (STAT_NAME "${MYNAME}-static")
+    ADD_LIBRARY ("${STAT_NAME}"
         STATIC
         ${FILEFIND_MODULES}
     )
-    LIST (APPEND PTHREAD_RWLOCK_FCFS_LIBS "libfilefind-static")
+    LIST (APPEND PTHREAD_RWLOCK_FCFS_LIBS "${STAT_NAME}")
 
     SET_TARGET_PROPERTIES(
-        libfilefind-static
-        PROPERTIES OUTPUT_NAME "libfilefind"
+        "${STAT_NAME}"
+        PROPERTIES OUTPUT_NAME "${LIBNAME}"
     )
     SET_TARGET_PROPERTIES(
         ${PTHREAD_RWLOCK_FCFS_LIBS}
     )
 ENDIF (${BUILD_STATIC_LIBRARY})
 
-SET_TARGET_PROPERTIES(libfilefind
+SET_TARGET_PROPERTIES("${LIBNAME}"
     PROPERTIES VERSION 0.1.0 SOVERSION 0
     )
 
-TARGET_LINK_LIBRARIES (libfilefind pthread)
+TARGET_LINK_LIBRARIES ("${LIBNAME}" pthread)
 
 INSTALL(
     FILES
         "README"
         "TODO"
     DESTINATION
-        "share/doc/libfilefind/"
+        "share/doc/${CPACK_PACKAGE_NAME}/"
 )
 
 INSTALL(
     FILES
-        "libfilefind/filefind.h"
+        "${LIBNAME}/filefind.h"
     DESTINATION
         "include/pthread"
 )
 
 ENABLE_TESTING()
 
-ADD_TEST(
-    runtime
-    ./test_rwlock --timeout 5
-)
-
-ADD_TEST(
-    runtime2
-    ./test_rwlock_2 --timeout 5
-)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.