~ubuntu-branches/debian/stretch/codelite/stretch

« back to all changes in this revision

Viewing changes to .pc/03_remove-bundled-libclang.patch/CMakeLists.txt

  • Committer: Package Import Robot
  • Author(s): James Cowgill
  • Date: 2014-09-01 00:23:18 UTC
  • mfrom: (1.1.14)
  • Revision ID: package-import@ubuntu.com-20140901002318-wx98wxrjb2e0ifi8
Tags: 6.1.1+dfsg-1
* New upstream release.

* debian/control
  - Build depend on libhunspell-dev.
  - Re-enable SFTP support using libssh-gcrypt.
  - Recommend valgrind (for new MemChecker plugin).
* debian/copyright
  - Remove bundled version of hunspell.
* debian/patches
  - Refresh patches.
  - Patch 10_move-helper-binaries.patch rewritten due to upstream changes.
  - Add 19_remove-bundled-clang-format.patch to fix clang-format paths.
  - Add 20_Compilation-fix-for-non-precompiled-header-builds.patch from
    upstream to fix build.
* debian/*.1
  - Remove manpages in debian/ - moved to upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
53
53
 
54
54
if ( UNIX )
55
55
    execute_process(COMMAND pwd OUTPUT_VARIABLE BUILD_DIRECTORY OUTPUT_STRIP_TRAILING_WHITESPACE)
56
 
else ( UNIX)
 
56
elseif(MINGW)
 
57
    set ( BUILD_DIRECTORY ${CMAKE_BINARY_DIR} )
 
58
else()
57
59
    set ( BUILD_DIRECTORY $ENV{CD} )
58
 
endif ( UNIX )
 
60
endif()
59
61
 
60
62
message( "-- BUILD_DIRECTORY is set to ${BUILD_DIRECTORY}")
61
63
 
79
81
 
80
82
set( CL_WX_CONFIG wx-config )
81
83
 
82
 
if (UNIX)
 
84
if (UNIX OR MINGW)
83
85
    execute_process(COMMAND which ${CL_WX_CONFIG} OUTPUT_VARIABLE WX_TOOL OUTPUT_STRIP_TRAILING_WHITESPACE)
84
86
    if (NOT WX_TOOL)
85
87
        message(FATAL_ERROR
86
88
"\nNo functional wx_config script was found in your PATH.\nIs the wxWidgets development package installed?"
87
89
             )
88
90
    else()
89
 
        execute_process(COMMAND ${WX_TOOL} --version OUTPUT_VARIABLE WX_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
 
91
        execute_process(COMMAND sh ${WX_TOOL} --version OUTPUT_VARIABLE WX_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
90
92
        string(SUBSTRING "${WX_VERSION}" "0" "1" wxMAJOR_VERSION)
91
93
        string(SUBSTRING "${WX_VERSION}" "2" "1" wxMINOR_VERSION)
92
94
        string(SUBSTRING "${WX_VERSION}" "4" "1" wxRELEASE_NUMBER)
95
97
"\nI'm afraid your wxWidgets version is too old.\nBuilding CodeLite requires at least wxWidgets-3.0.0"
96
98
             )
97
99
        endif()
 
100
        if (MINGW)
 
101
          add_definitions(-D__WXMSW__)
 
102
        endif (MINGW)
98
103
    endif()
99
104
    message("-- wx-config used is: ${WX_TOOL}")
100
105
    message("-- wxWidgets version is: ${WX_VERSION}")
101
 
    if (NOT APPLE)
 
106
    if (NOT APPLE AND NOT MINGW)
102
107
        # Is the wx we are using built on gtk2 or 3?
103
108
        execute_process(COMMAND ${WX_TOOL} --selected_config OUTPUT_VARIABLE WX_GTK_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
104
109
        string(SUBSTRING "${WX_GTK_VERSION}" "3" "1" GTK_VERSION)
105
110
        message("-- gtk version is: ${GTK_VERSION}")
106
111
    endif()
107
 
endif (UNIX)
 
112
endif (UNIX OR MINGW)
108
113
 
109
114
########################################
110
115
## Override defaults with user input
143
148
unset(ENABLE_SFTP CACHE)
144
149
 
145
150
if ( WITH_SFTP )
146
 
    if (UNIX AND NOT APPLE )
 
151
    if (UNIX AND NOT APPLE OR MINGW)
147
152
        ## Linux
148
 
        find_library(LIBSSH_LIB NAMES libssh.so HINTS /usr/local/lib /usr/lib ${CMAKE_INSTALL_LIBDIR})
149
 
        find_path(LIBSSH_INCLUDE_DIR NAMES libssh.h HINTS /usr/local/include /usr/include PATH_SUFFIXES libssh)
 
153
        if (MINGW)
 
154
            find_library(LIBSSH_LIB NAMES ssh PATH_SUFFIXES lib)
 
155
            find_path(LIBSSH_INCLUDE_DIR NAMES libssh.h PATH_SUFFIXES include/libssh)
 
156
        else()
 
157
            find_library(LIBSSH_LIB NAMES libssh.so HINTS /usr/local/lib /usr/lib ${CMAKE_INSTALL_LIBDIR})
 
158
            find_path(LIBSSH_INCLUDE_DIR NAMES libssh.h HINTS /usr/local/include /usr/include PATH_SUFFIXES libssh)
 
159
        endif()
150
160
        string(FIND ${LIBSSH_INCLUDE_DIR} "NOTFOUND" LIBSSH_NOT_FOUND_POS)
151
161
        if ( LIBSSH_NOT_FOUND_POS GREATER -1 )
152
162
            if (UNIX AND NOT APPLE )
159
169
            message(FATAL_ERROR "-- Could not find libssh")
160
170
        endif( LIBSSH_NOT_FOUND_POS GREATER -1 )
161
171
 
162
 
    else ( UNIX AND NOT APPLE )
 
172
    else ( UNIX AND NOT APPLE OR MINGW )
163
173
        ## OSX
164
174
        set( LIBSSH_INCLUDE_DIR ${CL_SRC_ROOT}/sdk/libssh/include)
165
175
        set( LIBSSH_LIB ${CL_SRC_ROOT}/sdk/libssh/lib/osx/libssh.a)
166
176
        include_directories(${LIBSSH_INCLUDE_DIR})
167
 
    endif ( UNIX AND NOT APPLE )
 
177
    endif ( UNIX AND NOT APPLE OR MINGW )
168
178
    message("-- LIBSSH_LIB is set to ${LIBSSH_LIB}")
169
179
endif ( WITH_SFTP )
170
180
 
325
335
 
326
336
    set(CPACK_GENERATOR                   "DEB")
327
337
    set(CPACK_PACKAGE_NAME                "codelite")
328
 
    set(CPACK_PACKAGE_VERSION             "6.0")
 
338
    set(CPACK_PACKAGE_VERSION             "6.1")
329
339
    set(CPACK_DEBIAN_PACKAGE_MAINTAINER   "Eran Ifrah <eran.ifrah@gmail.com>") #required
330
340
    set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "codelite IDE for C/C++")
331
341
    set(CPACK_DEBIAN_PACKAGE_SECTION      "devel")
345
355
  set( CLANG_LIBRARY "-L${CL_SRC_ROOT}/sdk/clang/lib -lclang" )
346
356
  set( CLANG_BINARY "${CL_SRC_ROOT}/sdk/clang/lib/libclang.dylib")
347
357
 
 
358
elseif (MINGW)
 
359
  find_package(LLVM)
 
360
  if (LLVM_FOUND)
 
361
    find_package(Clang)
 
362
    if (CLANG_FOUND)
 
363
        set( CLANG_INCLUDE "${CLANG_INCLUDE_DIRS}" )
 
364
        set( CLANG_LIBRARY "${CLANG_LDFLAGS}")
 
365
        set( CLANG_BINARY "")
 
366
    endif ()
 
367
  endif ()
348
368
elseif (UNIX)
349
369
  set( CLANG_INCLUDE "${CL_SRC_ROOT}/sdk/clang/Linux/${ARCH_NAME}/include" )
350
370
  set( CLANG_LIBRARY "-L${CL_SRC_ROOT}/sdk/clang/Linux/${ARCH_NAME}/lib -lclang" )
382
402
 
383
403
if ( APPLE )
384
404
    execute_process(COMMAND mkdir -p pack)
385
 
    execute_process(COMMAND cp ../Runtime/make_mac_bundle.sh pack)
 
405
    execute_process(COMMAND cp ${CMAKE_SOURCE_DIR}/Runtime/make_mac_bundle.sh pack)
386
406
endif( APPLE )
387
407
 
388
408
###########################################
407
427
    add_subdirectory(PCH)
408
428
endif ( USE_PCH )
409
429
 
 
430
if ( APPLE )
 
431
    add_definitions( -mmacosx-version-min=10.7 )
 
432
endif()
 
433
 
410
434
add_subdirectory(sdk/wxshapeframework)
411
435
add_subdirectory(sdk/databaselayer)
412
436
add_subdirectory(CodeLite)
424
448
    add_subdirectory(cppchecker)
425
449
    add_subdirectory(cscope)
426
450
    add_subdirectory(wxformbuilder)
 
451
    
 
452
if ( UNIX AND NOT APPLE )
 
453
    ## Add valgrind plugin
 
454
    add_subdirectory(MemCheck)
 
455
endif ( UNIX AND NOT APPLE )
427
456
 
428
457
    if ( BUILD_WXC )
429
458
        add_subdirectory(wxcrafter)
446
475
add_subdirectory(git)
447
476
add_subdirectory(CMakePlugin)
448
477
add_subdirectory(CodeLiteDiff)
 
478
add_subdirectory(SpellChecker)
449
479
 
450
480
if (WITH_SFTP)
451
481
    add_subdirectory(SFTP)
467
497
    add_subdirectory(codelite_clang)
468
498
endif(USE_CLANG)
469
499
 
 
500
 
470
501
##
471
502
## Setup the proper dependencies
472
503
##