Commit 2f67fc4d authored by Pawel Sznajder's avatar Pawel Sznajder
Browse files

Pure cosmetics in CMakeLists.txt

parent a547ef27
# BASIC DEFINITIONS ========================================================================
# define minimum version of cmake
cmake_minimum_required(VERSION 2.6) cmake_minimum_required(VERSION 2.6)
# define project name and its language
project(ElementaryUtils CXX) project(ElementaryUtils CXX)
# Force C++98 warnings # define c++ standard and issue all the warning demanded by this standard
add_definitions(-std=c++98 -pedantic) add_definitions(-std=c++98 -pedantic)
# Tell CMake to run moc when necessary: # AUTOMOC ==================================================================================
# tell cmake to run Qt moc when necessary
set(CMAKE_AUTOMOC ON) set(CMAKE_AUTOMOC ON)
# As moc files are generated in the binary dir, tell CMake # as moc files are generated in the binary dir, tell cmake to always look for includes there
# to always look for includes there:
set(CMAKE_INCLUDE_CURRENT_DIR ON) set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/lib) set(LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/lib)
# Recherche de librairies # FIND LIBRARIES ===========================================================================
# find libraries: additional modules
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/") set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
find_package(SFML COMPONENTS system REQUIRED)
# Inclusion des libraries # find libraries: SFML
INCLUDE_DIRECTORIES(${SFML_INCLUDE_DIR}) find_package(SFML COMPONENTS system REQUIRED)
#Inclusion des en-têtes publics # directories containing headers
include_directories(${SFML_INCLUDE_DIR})
include_directories(include) include_directories(include)
# FINALIZE ==================================================================================
# generate list of source files
file( file(
GLOB_RECURSE GLOB_RECURSE
...@@ -33,7 +42,7 @@ file( ...@@ -33,7 +42,7 @@ file(
src/* src/*
) )
#Génération de la liste des fichiers sources # define target library
add_library( add_library(
ElementaryUtils ElementaryUtils
...@@ -43,7 +52,7 @@ add_library( ...@@ -43,7 +52,7 @@ add_library(
${source_files} ${source_files}
) )
#Configuration de l'édition de liens # define libraries to be linked
target_link_libraries( target_link_libraries(
ElementaryUtils ElementaryUtils
...@@ -51,9 +60,9 @@ target_link_libraries( ...@@ -51,9 +60,9 @@ target_link_libraries(
${SFML_LIBRARIES} ${SFML_LIBRARIES}
) )
# Installation # install
install (TARGETS ElementaryUtils install(TARGETS ElementaryUtils
RUNTIME DESTINATION bin/PARTONS RUNTIME DESTINATION bin/PARTONS
LIBRARY DESTINATION lib/PARTONS LIBRARY DESTINATION lib/PARTONS
ARCHIVE DESTINATION lib/static/PARTONS) ARCHIVE DESTINATION lib/static/PARTONS)
install (DIRECTORY include/ DESTINATION include/PARTONS) install(DIRECTORY include/ DESTINATION include/PARTONS)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment