Debian Codegraph @

HelpPlugin/CMakeLists.txt

raw
1
2
3
4 # set the plugin name here
5 set( PLUGIN_NAME "HelpPlugin")
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
51 # Remove the "lib" prefix from the plugin name
52 set_target_properties(${PLUGIN_NAME} PROPERTIES PREFIX "")
53 target_link_libraries(${PLUGIN_NAME}
54 ${LINKER_OPTIONS}
55 ${wxWidgets_LIBRARIES}
56 libcodelite
57 plugin
58 )
59
60 # Use CodeLite's macro: CL_INSTALL_PLUGIN which handles both OSX and Linux installation
61 CL_INSTALL_PLUGIN(${PLUGIN_NAME})