source: s10k/CommonLibs/quazip-0.7.2/quazip/CMakeLists.txt@ 1194

Last change on this file since 1194 was 1096, checked in by s10k, 7 years ago

Added zlib, quazip, basicxmlsyntaxhighlighter, conditionalsemaphore and linenumberdisplay libraries. zlib and quazip are pre-compiled, but you can compile them yourself, just delete the dll files (or equivalent binary files to your OS)

File size: 1.4 KB
RevLine 
[1096]1# set all include directories for in and out of source builds
2include_directories(
3 ${CMAKE_CURRENT_SOURCE_DIR}
4 ${CMAKE_CURRENT_BINARY_DIR}
5 ${ZLIB_INCLUDE_DIRS}
6)
7
8file(GLOB SRCS "*.c" "*.cpp")
9file(GLOB PUBLIC_HEADERS "*.h")
10
11# Must be added to enable export macro
12ADD_DEFINITIONS(-DQUAZIP_BUILD)
13
14qt_wrap_cpp(MOC_SRCS ${PUBLIC_HEADERS})
15set(SRCS ${SRCS} ${MOC_SRCS})
16
17add_library(${QUAZIP_LIB_TARGET_NAME} SHARED ${SRCS})
18add_library(quazip_static STATIC ${SRCS})
19
20# Windows uses .lib extension for both static and shared library
21# *nix systems use different extensions for SHARED and STATIC library and by convention both libraries have the same name
22if (NOT WIN32)
23 set_target_properties(quazip_static PROPERTIES OUTPUT_NAME quazip${QUAZIP_LIB_VERSION_SUFFIX})
24endif ()
25
26set_target_properties(${QUAZIP_LIB_TARGET_NAME} quazip_static PROPERTIES VERSION 1.0.0 SOVERSION 1 DEBUG_POSTFIX d)
27# Link against ZLIB_LIBRARIES if needed (on Windows this variable is empty)
28target_link_libraries(${QUAZIP_LIB_TARGET_NAME} quazip_static ${QT_QTMAIN_LIBRARY} ${QTCORE_LIBRARIES} ${ZLIB_LIBRARIES})
29
30install(FILES ${PUBLIC_HEADERS} DESTINATION include/quazip${QUAZIP_LIB_VERSION_SUFFIX})
31install(TARGETS ${QUAZIP_LIB_TARGET_NAME} quazip_static LIBRARY DESTINATION ${LIB_DESTINATION} ARCHIVE DESTINATION ${LIB_DESTINATION} RUNTIME DESTINATION ${LIB_DESTINATION})
Note: See TracBrowser for help on using the repository browser.