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