Debian Codegraph @

Rust/CMakeLists.txt

raw
1
2
3
4 # set the plugin name here
5 set( PLUGIN_NAME "Rust")
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
28 if ( USE_PCH AND NOT MINGW )
29 add_definitions(-include "${CL_PCH_FILE}")
30 add_definitions(-Winvalid-pch)
31 endif()
32
33 if (UNIX AND NOT APPLE)
34 set ( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC" )
35 set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC" )
36 endif()
37
38 if ( APPLE )
39 add_definitions(-fPIC)
40 endif()
41
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 # Codelite plugins doesn't use the "lib" prefix.
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 # Installation destination
59 CL_INSTALL_PLUGIN(${PLUGIN_NAME})
60
61 if(MINGW)
62 codelite_install_script(${CL_SRC_ROOT}/Runtime/rust-gdb.bat)
63 endif()