From bebade8241503c2caa6127a1c38b18940803f30e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matt=C3=A9o=20Delabre=20=E2=9C=8F?= Date: Tue, 31 May 2016 21:42:30 +0200 Subject: [PATCH] Compilation et liaison statique de SFGUI pour la distribution --- CMakeLists.txt | 3 ++- docs/guides/compilation-linux.md | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index aab53d9..0de4d25 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -43,6 +43,7 @@ add_executable(${CMAKE_PROJECT_NAME} ${SOURCES}) find_package(SFML 2.3.2 REQUIRED system window graphics network audio) find_package(Boost 1.58.0 COMPONENTS system filesystem) +set(SFGUI_STATIC_LIBRARIES YES) find_package(SFGUI 0.2.3 REQUIRED) include_directories(${SFML_INCLUDE_DIR}) @@ -51,7 +52,7 @@ include_directories(${SFGUI_INCLUDE_DIR}) target_link_libraries(${CMAKE_PROJECT_NAME} ${SFML_LIBRARIES}) target_link_libraries(${CMAKE_PROJECT_NAME} ${Boost_LIBRARIES}) -target_link_libraries(${CMAKE_PROJECT_NAME} ${SFGUI_LIBRARY}) +target_link_libraries(${CMAKE_PROJECT_NAME} ${SFGUI_LIBRARY} ${SFGUI_DEPENDENCIES}) # Informations pour la création des packages set(CPACK_PACKAGE_VERSION_MAJOR ${PROJECT_VERSION_MAJOR}) diff --git a/docs/guides/compilation-linux.md b/docs/guides/compilation-linux.md index 9a72c2e..c87de8b 100644 --- a/docs/guides/compilation-linux.md +++ b/docs/guides/compilation-linux.md @@ -45,11 +45,13 @@ $ wget -O SFGUI.tar.gz $(curl -s https://api.github.com/repos/TankOs/SFGUI/relea $ mkdir SFGUI $ tar -zxf SFGUI.tar.gz -C SFGUI --strip-components=1 $ cd SFGUI -$ cmake . +$ cmake -DSFGUI_BUILD_SHARED_LIBS=NO . $ make $ sudo make install ``` +Ceci a pour effet de compiler SFGUI en version statique et d'installer +les librairies produites dans `/usr/local/lib`. Vous pouvez supprimer l'archive `SFGUI.tar.gz` et le dossier `SFGUI` si vous n'en avez plus besoin.