Compilation et liaison statique de SFGUI pour la distribution

This commit is contained in:
Mattéo Delabre 2016-05-31 21:42:30 +02:00
parent b1f78b9b3f
commit bebade8241
2 changed files with 5 additions and 2 deletions

3
CMakeLists.txt vendored
View File

@ -43,6 +43,7 @@ add_executable(${CMAKE_PROJECT_NAME} ${SOURCES})
find_package(SFML 2.3.2 REQUIRED system window graphics network audio) find_package(SFML 2.3.2 REQUIRED system window graphics network audio)
find_package(Boost 1.58.0 COMPONENTS system filesystem) find_package(Boost 1.58.0 COMPONENTS system filesystem)
set(SFGUI_STATIC_LIBRARIES YES)
find_package(SFGUI 0.2.3 REQUIRED) find_package(SFGUI 0.2.3 REQUIRED)
include_directories(${SFML_INCLUDE_DIR}) 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} ${SFML_LIBRARIES})
target_link_libraries(${CMAKE_PROJECT_NAME} ${Boost_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 # Informations pour la création des packages
set(CPACK_PACKAGE_VERSION_MAJOR ${PROJECT_VERSION_MAJOR}) set(CPACK_PACKAGE_VERSION_MAJOR ${PROJECT_VERSION_MAJOR})

View File

@ -45,11 +45,13 @@ $ wget -O SFGUI.tar.gz $(curl -s https://api.github.com/repos/TankOs/SFGUI/relea
$ mkdir SFGUI $ mkdir SFGUI
$ tar -zxf SFGUI.tar.gz -C SFGUI --strip-components=1 $ tar -zxf SFGUI.tar.gz -C SFGUI --strip-components=1
$ cd SFGUI $ cd SFGUI
$ cmake . $ cmake -DSFGUI_BUILD_SHARED_LIBS=NO .
$ make $ make
$ sudo make install $ 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` Vous pouvez supprimer l'archive `SFGUI.tar.gz` et le dossier `SFGUI`
si vous n'en avez plus besoin. si vous n'en avez plus besoin.