Warning, /sdk/kdesvn/src/svnqt/CMakeLists.txt is written in an unsupported language. File is not indexed.
0001 #### 0002 # Copyright (C) 2005-2009 by Rajko Albrecht ral@alwins-world.de # 0003 # http://kdesvn.alwins-world.de/ # 0004 # # 0005 # This program is free software; you can redistribute it and/or modify # 0006 # it under the terms of the GNU General Public License as published by # 0007 # the Free Software Foundation; either version 2 of the License, or # 0008 # (at your option) any later version. # 0009 # # 0010 # This program is distributed in the hope that it will be useful, # 0011 # but WITHOUT ANY WARRANTY; without even the implied warranty of # 0012 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # 0013 # GNU General Public License for more details. # 0014 # # 0015 # You should have received a copy of the GNU General Public License # 0016 # along with this program; if not, write to the # 0017 # Free Software Foundation, Inc., # 0018 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # 0019 #### 0020 0021 option(OVERRIDE_SVN_API_VERSION "Override the current API version (e.g. to compile against 1.6 api when 1.8 is installed)" OFF) 0022 if(OVERRIDE_SVN_API_VERSION) 0023 set(OVERRIDE_SVN_API_VERSION_STR 0x10600 CACHE STRING "svn api version to use, hex format, two digits per major/minor/patch") 0024 endif() 0025 0026 set(SOURCES 0027 annotate_line.cpp 0028 apr.cpp 0029 cache/DatabaseException.cpp 0030 cache/LogCache.cpp 0031 cache/ReposConfig.cpp 0032 cache/ReposLog.cpp 0033 client_annotate.cpp 0034 client_annotate_parameter.cpp 0035 client_cat.cpp 0036 client_commit_parameter.cpp 0037 client.cpp 0038 client_diff.cpp 0039 client_impl.cpp 0040 client_lock.cpp 0041 client_ls.cpp 0042 client_merge.cpp 0043 client_modify.cpp 0044 client_parameter.cpp 0045 client_property.cpp 0046 client_status.cpp 0047 client_update_parameter.cpp 0048 commititem.cpp 0049 conflictdescription.cpp 0050 conflictresult.cpp 0051 context.cpp 0052 contextdata.cpp 0053 datetime.cpp 0054 diff_data.cpp 0055 diffoptions.cpp 0056 dirent.cpp 0057 entry.cpp 0058 exception.cpp 0059 info_entry.cpp 0060 lock_entry.cpp 0061 log_entry.cpp 0062 path.cpp 0063 pool.cpp 0064 repository.cpp 0065 repositorydata.cpp 0066 repositorylistener.cpp 0067 reposnotify.cpp 0068 revision.cpp 0069 status.cpp 0070 stringarray.cpp 0071 svnfilestream.cpp 0072 svnstream.cpp 0073 targets.cpp 0074 url.cpp 0075 version_check.cpp 0076 ) 0077 0078 0079 configure_file( 0080 "${CMAKE_CURRENT_SOURCE_DIR}/svnqt_defines.h.in" 0081 "${CMAKE_CURRENT_BINARY_DIR}/svnqt_defines.h" 0082 IMMEDIATE 0083 @ONLY) 0084 0085 add_library(svnqt STATIC ${SOURCES}) 0086 if(WIN32) 0087 target_compile_definitions(svnqt PUBLIC _USE_32BIT_TIME_T) 0088 endif() 0089 if(OVERRIDE_SVN_API_VERSION) 0090 target_compile_definitions(svnqt PUBLIC OVERRIDE_SVN_API_VERSION=${OVERRIDE_SVN_API_VERSION_STR}) 0091 endif() 0092 0093 set(ALL_LINKFLAGS ${APR_EXTRA_LDFLAGS}) 0094 set(ALL_LINKFLAGS "${ALL_LINKFLAGS} ${APU_EXTRA_LDFLAGS}") 0095 0096 if(WIN32 OR APPLE) 0097 set_property(TARGET svnqt APPEND PROPERTY LINK_FLAGS "${ALL_LINKFLAGS} ${LINK_NO_UNDEFINED}") 0098 else() 0099 set_property(TARGET svnqt APPEND PROPERTY LINK_FLAGS "-Wl,--as-needed ${ALL_LINKFLAGS} ${LINK_NO_UNDEFINED}") 0100 endif() 0101 0102 target_link_libraries(svnqt 0103 PUBLIC 0104 ${SUBVERSION_ALL_LIBS} 0105 KF5::ConfigCore 0106 Qt5::Core 0107 Qt5::Sql 0108 ) 0109 target_include_directories(svnqt 0110 PUBLIC 0111 ${CMAKE_CURRENT_SOURCE_DIR}/../ 0112 ${CMAKE_CURRENT_BINARY_DIR}/../ 0113 ) 0114 set_property(TARGET svnqt APPEND PROPERTY COMPILE_FLAGS ${APR_CPP_FLAGS}) 0115 set_property(TARGET svnqt PROPERTY CXX_VISIBILITY_PRESET hidden) 0116 0117 if(Backtrace_FOUND) 0118 target_include_directories(svnqt PUBLIC SYSTEM ${Backtrace_INCLUDE_DIRS}) 0119 target_link_libraries(svnqt PUBLIC ${Backtrace_LIBRARY}) 0120 endif() 0121 0122 if(WIN32) 0123 target_link_libraries(svnqt wsock32.lib) 0124 endif() 0125 0126 # Just a small linking test 0127 if(KDE4_BUILD_TESTS) 0128 add_executable(testlink testmain.cpp) 0129 target_link_libraries(testlink svnqt) 0130 endif() 0131 0132 if(KDE4_BUILD_TESTS) 0133 add_subdirectory(tests) 0134 add_subdirectory(cache/test) 0135 endif()