Debian Codegraph @

LanguageServer/CMakeLists.txt

raw
1
2
3
4 # set the plugin name here
5 set( PLUGIN_NAME "LanguageServer")
6
7 # Our project is called 'plugin' this is how it will be called in
8 # visual studio, and in our makefiles.
9 project( ${PLUGIN_NAME} )
10
11 # It was noticed that when using MinGW gcc it is essential that 'core' is mentioned before 'base'.
12
13
14 # wxWidgets include (this will do all the magic to configure everything)
15 include( "${wxWidgets_USE_FILE}" )
16
17 # Include paths
18 include_directories("${CL_SRC_ROOT}/Plugin"
19 "${CL_SRC_ROOT}/sdk/wxsqlite3/include"
20 "${CL_SRC_ROOT}/CodeLite"
21 "${CL_SRC_ROOT}/PCH"
22 "${CL_SRC_ROOT}/Interfaces")
23
24 add_definitions(-DWXUSINGDLL_WXSQLITE3)
25 add_definitions(-DWXUSINGDLL_CL)
26 add_definitions(-DWXUSINGDLL_SDK)
27 add_definitions(-DASTYLE_LIB)
28
29 if ( USE_PCH AND NOT MINGW )
30 add_definitions(-include "${CL_PCH_FILE}")
31 add_definitions(-Winvalid-pch)
32 endif()
33
34 if (UNIX AND NOT APPLE)
35 set ( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC" )
36 set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC" )
37 endif()
38
39 if ( APPLE )
40 add_definitions(-fPIC)
41 endif()
42
43 FILE(GLOB SRCS "*.cpp")
44
45 # Define the output
46 add_library(${PLUGIN_NAME} SHARED ${SRCS})
47
48 target_precompile_headers(${PLUGIN_NAME} REUSE_FROM PCH)
49
50 # Remove the "lib" prefix from the plugin name
51 set_target_properties(${PLUGIN_NAME} PROPERTIES PREFIX "")
52 target_link_libraries(${PLUGIN_NAME}
53 ${LINKER_OPTIONS}
54 ${wxWidgets_LIBRARIES}
55 libcodelite
56 plugin
57 )
58
59 # Use CodeLite's macro: CL_INSTALL_PLUGIN which handles both OSX and Linux installation
60 CL_INSTALL_PLUGIN(${PLUGIN_NAME})
61
62 set(EXE_PERM OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_EXECUTE GROUP_READ WORLD_EXECUTE WORLD_READ)
63 if(APPLE)
64 install(FILES ${CL_SRC_ROOT}/LanguageServer/codelite-lsp/codelite-lsp-helper DESTINATION
65 ${CMAKE_BINARY_DIR}/codelite.app/Contents/MacOS/ PERMISSIONS ${EXE_PERM})
66 endif()
67
68 if(MINGW)
69 # install clangd
70 msys_install_clang64_tool(clangd.exe ${CL_INSTALL_BIN})
71 endif()