Skip to content
This repository has been archived by the owner on May 9, 2024. It is now read-only.

Modifs pour compil linux ubuntu focal #1

Merged
merged 1 commit into from
Feb 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@ if (APPLE)
set(AFV_LIB ${CMAKE_SOURCE_DIR}/extern/afv_native/lib/apple/libafv.dylib)
endif()

if (LINUX)
set(AFV_LIB ${CMAKE_SOURCE_DIR}/extern/afv_native/lib/linux64/libafv.a)
if (UNIX AND NOT APPLE)
FIND_PACKAGE(Threads REQUIRED)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread")
set(AFV_LIB ${CMAKE_SOURCE_DIR}/extern/afv_native/lib/libafv.so)
endif()

add_executable(afv_unix src/main.cpp
Expand All @@ -36,6 +38,6 @@ add_executable(afv_unix src/main.cpp
${CMAKE_SOURCE_DIR}/extern/imgui/imgui_demo.cpp
${CMAKE_SOURCE_DIR}/extern/imgui/imgui_stdlib.cpp)

target_link_libraries(afv_unix ${OPENGL_LIBRARIES} sfml-system sfml-window sfml-graphics sfml-network ${AFV_LIB})
target_link_libraries(afv_unix ${OPENGL_LIBRARIES} sfml-system sfml-window sfml-graphics sfml-network ${AFV_LIB} ${CMAKE_THREAD_LIBS_INIT})

file(COPY ${AFV_LIB} DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
1 change: 1 addition & 0 deletions include/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include <thread>
#include <iostream>
#include <SFML/Config.hpp>
#include <filesystem>

namespace afv_unix {

Expand Down