2 INCLUDE (CheckFunctionExists)
3 CHECK_FUNCTION_EXISTS (qsort_r HAVE_QSORT_R)
4 CHECK_FUNCTION_EXISTS (__qsort_r HAVE___QSORT_R)
7 ADD_DEFINITIONS (-DHAVE_QSORT_R=1)
11 ADD_DEFINITIONS (-DHAVE___QSORT_R=1)
12 ENDIF (HAVE___QSORT_R)
14 ADD_DEFINITIONS (-DLIBSOLV_INTERNAL=1)
17 bitmap.c poolarch.c poolvendor.c poolid.c strpool.c dirpool.c
18 solver.c solverdebug.c repo_solv.c repo_write.c evr.c pool.c
19 queue.c repo.c repodata.c repopage.c util.c policy.c solvable.c
20 transaction.c order.c rules.c problems.c linkedpkg.c cplxdeps.c
21 chksum.c md5.c sha1.c sha2.c solvversion.c selection.c
22 fileprovides.c diskusage.c suse.c solver_util.c cleandeps.c
23 userinstalled.c filelistfilter.c decision.c)
26 bitmap.h evr.h hash.h policy.h poolarch.h poolvendor.h pool.h
27 poolid.h pooltypes.h queue.h solvable.h solver.h solverdebug.h
28 repo.h repodata.h repo_solv.h repo_write.h util.h selection.h
29 strpool.h dirpool.h knownid.h transaction.h rules.h problems.h
30 chksum.h dataiterator.h ${CMAKE_BINARY_DIR}/src/solvversion.h)
33 SET (libsolv_SRCS ${libsolv_SRCS} conda.c)
34 SET (libsolv_HEADERS ${libsolv_HEADERS} conda.h)
38 SET (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
42 INCLUDE (${PROJECT_SOURCE_DIR}/win32/CMakeLists.txt)
43 LIST (APPEND libsolv_SRCS ${WIN32_COMPAT_SOURCES})
46 IF (HAVE_LINKER_VERSION_SCRIPT)
47 SET (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${LINK_FLAGS} -Wl,--version-script=${CMAKE_SOURCE_DIR}/src/libsolv.ver")
48 ENDIF (HAVE_LINKER_VERSION_SCRIPT)
51 ADD_LIBRARY (libsolv STATIC ${libsolv_SRCS})
53 ADD_LIBRARY (libsolv SHARED ${libsolv_SRCS})
54 ENDIF (DISABLE_SHARED)
58 TARGET_COMPILE_DEFINITIONS(libsolv PUBLIC SOLV_STATIC_LIB)
60 TARGET_COMPILE_DEFINITIONS(libsolv PRIVATE SOLV_EXPORTS)
61 ENDIF (DISABLE_SHARED)
64 SET_TARGET_PROPERTIES(libsolv PROPERTIES OUTPUT_NAME "solv")
65 SET_TARGET_PROPERTIES(libsolv PROPERTIES SOVERSION ${LIBSOLV_SOVERSION})
67 INSTALL (FILES ${libsolv_HEADERS} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/solv")
68 INSTALL (TARGETS libsolv LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
70 IF (ENABLE_STATIC AND NOT DISABLE_SHARED)
71 ADD_LIBRARY (libsolv_static STATIC ${libsolv_SRCS})
72 SET_TARGET_PROPERTIES(libsolv_static PROPERTIES OUTPUT_NAME "solv")
73 SET_TARGET_PROPERTIES(libsolv_static PROPERTIES SOVERSION ${LIBSOLV_SOVERSION})
74 INSTALL (TARGETS libsolv_static LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
75 ENDIF (ENABLE_STATIC AND NOT DISABLE_SHARED)