Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
partons
core
elementary-utils
Commits
2f67fc4d
Commit
2f67fc4d
authored
Jun 29, 2017
by
Pawel Sznajder
Browse files
Pure cosmetics in CMakeLists.txt
parent
a547ef27
Changes
1
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
2f67fc4d
# 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
)
#
Forc
e
C
++
98 warnings
#
defin
e
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
}
)
)
#
I
nstall
ation
#
i
nstall
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
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment