| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
# Our project is called 'codelite' this is how it will be called in |
| 5 |
# visual studio, and in our makefiles. |
| 6 |
project(codelite-client) |
| 7 |
set(CMAKE_EXPORT_COMPILE_COMMANDS 1) |
| 8 |
|
| 9 |
# It was noticed that when using MinGW gcc it is essential that 'core' is mentioned before 'base'. |
| 10 |
|
| 11 |
include("${wxWidgets_USE_FILE}") |
| 12 |
|
| 13 |
# we need wxWidgets flags to be set only for the c++ files, so we do it like this |
| 14 |
# by setting the CMAKE_CXX_FLAGS |
| 15 |
if(NOT MINGW) |
| 16 |
execute_process(COMMAND ${CL_WX_CONFIG} --cxxflags OUTPUT_VARIABLE WX_CXX_FLAGS OUTPUT_STRIP_TRAILING_WHITESPACE) |
| 17 |
else() |
| 18 |
execute_process(COMMAND sh ${CL_WX_CONFIG} --cxxflags OUTPUT_VARIABLE WX_CXX_FLAGS OUTPUT_STRIP_TRAILING_WHITESPACE) |
| 19 |
endif() |
| 20 |
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${WX_CXX_FLAGS}") |
| 21 |
message("${WX_CXX_FLAGS}") |
| 22 |
|
| 23 |
FILE(GLOB CODELITECLIENT_SRCS "*.cpp") |
| 24 |
|
| 25 |
# and finally prepare list of includes directories |
| 26 |
include_directories("${CL_SRC_ROOT}/sdk/wxsqlite3/include" |
| 27 |
"${CL_SRC_ROOT}/CodeLite" |
| 28 |
"${CL_SRC_ROOT}/sdk/codelite_indexer/network") |
| 29 |
|
| 30 |
# Define the output |
| 31 |
add_executable(codelite-client ${CODELITECLIENT_SRCS}) |
| 32 |
target_compile_definitions(codelite-client PRIVATE wxUSE_GUI=1) |
| 33 |
if(UNIX) |
| 34 |
set(UTIL_LIB "${UTIL_LIB} -lutil") |
| 35 |
endif(UNIX) |
| 36 |
target_link_libraries(codelite-client |
| 37 |
codelitelib |
| 38 |
${LINKER_OPTIONS} |
| 39 |
${wxWidgets_LIBRARIES} |
| 40 |
${UTIL_LIB} |
| 41 |
) |
| 42 |
|