Browse Source

Cleanup of the CMakeLists.txt files

merge-requests/365/head
eidheim 10 years ago
parent
commit
7fa66b1816
  1. 16
      CMakeLists.txt
  2. 21
      src/CMakeLists.txt
  3. 13
      tests/CMakeLists.txt

16
CMakeLists.txt

@ -28,6 +28,9 @@ if(APPLE)
set(CMAKE_MACOSX_RPATH 1)
set(ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_PATH}:/usr/local/lib/pkgconfig:/opt/X11/lib/pkgconfig")
endif()
if(${CMAKE_SYSTEM_NAME} MATCHES FreeBSD)
link_directories(/usr/local/lib)
endif()
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake_modules/")
find_package(LibClang REQUIRED)
@ -54,6 +57,19 @@ pkg_check_modules(GTKMM gtkmm-3.0 REQUIRED)
pkg_check_modules(GTKSVMM gtksourceviewmm-3.0 REQUIRED)
pkg_check_modules(LIBGIT2 libgit2 REQUIRED)
if(MSYS)
set(global_libraries winpthread)
endif()
set(global_libraries ${global_libraries}
${GTKMM_LIBRARIES}
${GTKSVMM_LIBRARIES}
${Boost_LIBRARIES}
${LIBCLANG_LIBRARIES}
${LIBLLDB_LIBRARIES}
${ASPELL_LIBRARIES}
${LIBGIT2_LIBRARIES}
)
add_subdirectory("src")
#TODO: instead of the if-expression below, disable tests on Travis CI for clang++ builds

21
src/CMakeLists.txt

@ -14,26 +14,6 @@ set(global_includes
.
)
if(MSYS)
set(global_libraries winpthread)
endif()
set(global_libraries ${global_libraries}
${GTKMM_LIBRARIES}
${GTKSVMM_LIBRARIES}
${Boost_LIBRARIES}
${LIBCLANG_LIBRARIES}
${LIBLLDB_LIBRARIES}
${ASPELL_LIBRARIES}
${LIBGIT2_LIBRARIES}
)
if (${CMAKE_SYSTEM_NAME} MATCHES FreeBSD)
set(global_link_directories /usr/local/lib)
endif()
set(global_link_directories
${Boost_LIBRARY_DIRS}
)
set(project_files
config.cc
dialogs.cc
@ -93,7 +73,6 @@ else()
endif()
include_directories(${global_includes})
link_directories(${global_link_directories})
add_library(project_shared OBJECT ${project_shared_files})

13
tests/CMakeLists.txt

@ -12,19 +12,6 @@ set(global_includes
../src
)
if(MSYS)
set(global_libraries winpthread)
endif()
set(global_libraries ${global_libraries}
${GTKMM_LIBRARIES}
${GTKSVMM_LIBRARIES}
${Boost_LIBRARIES}
${LIBCLANG_LIBRARIES}
${LIBLLDB_LIBRARIES}
${ASPELL_LIBRARIES}
${LIBGIT2_LIBRARIES}
)
set(stub_files
stubs/config.cc
stubs/dialogs.cc

Loading…
Cancel
Save