Browse Source

Removed non-standard cmake error messages, should now be able to google the errors if any when running cmake .

merge-requests/365/head
eidheim 10 years ago
parent
commit
ff34125d63
  1. 41
      src/CMakeLists.txt

41
src/CMakeLists.txt

@ -12,44 +12,16 @@ endif()
INCLUDE(FindPkgConfig)
set(validation true)
function(install_help APPLE UNIX WINDOWS)
message("Install package with:")
if(UNIX)
if(APPLE)
message("brew install ${APPLE}")
else()
message("sudo apt-get install ${UNIX}")
endif(APPLE)
endif(UNIX)
if(WINDOWS)
#message("choco install ${WINDOWS}") #Removed this for the time being
endif(WINDOWS)
endfunction(install_help)
function(validate FOUND APPLE UNIX WINDOWS)
if(!${FOUND})
set(validation false)
install_help(${APPLE} ${UNIX} ${WINDOWS})
endif()
endfunction(validate)
find_package(LibClang)
validate(${LIBCLANG_FOUND} "clang" "libclang-dev" "llvm")
#find_package(PythonLibs 2.7)
#validate(${PYTHONLIBS_FOUND} "python" "libpython-dev" "python")
#find_package(Boost 1.55 COMPONENTS python thread log system filesystem REQUIRED)
find_package(Boost 1.55 COMPONENTS thread log system filesystem REQUIRED)
validate(${Boost_FOUND} "boost" "libboost-all-dev" "boost")
pkg_check_modules(GTKMM gtkmm-3.0) # The name GTKMM is set here for the variables abouve
validate(${GTKMM_FOUND} "gtkmm" "libgtkmm-dev" "gtkmm")
pkg_check_modules(GTKMM gtkmm-3.0 REQUIRED) # The name GTKMM is set here for the variables abouve
pkg_check_modules(GTKSVMM gtksourceviewmm-3.0)
validate(${GTKSVMM_FOUND} "gtksvmm" "libgtksvmm-dev" "gtkmmsv")
pkg_check_modules(GTKSVMM gtksourceviewmm-3.0 REQUIRED)
find_package(ASPELL REQUIRED)
@ -104,7 +76,6 @@ else()
list(APPEND source_files terminal.cc)
endif()
if(${validation})
add_executable(${project_name} ${source_files})
# add_library(${module} SHARED
@ -119,7 +90,8 @@ if(${validation})
${LCL_INCLUDE_DIRS}
${LIBCLANG_INCLUDE_DIRS}
${ASPELL_INCLUDE_DIR}
../libclangmm/src)
../libclangmm/src
)
link_directories(
${GTKMM_LIBRARY_DIRS}
@ -127,7 +99,8 @@ if(${validation})
${Boost_LIBRARY_DIRS}
# ${PYTHON_INCLUDE_DIRS}
${LCL_LIBRARY_DIRS}
${LIBCLANG_LIBRARY_DIRS})
${LIBCLANG_LIBRARY_DIRS}
)
# set_target_properties(${module}
# PROPERTIES PREFIX ""
@ -151,5 +124,3 @@ if(${validation})
RUNTIME DESTINATION bin
# LIBRARY DESTINATION ${lib_install_path}
)
endif(${validation})

Loading…
Cancel
Save