Skip to content

Commit

Permalink
-fPIC fix on Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
Mormert committed Dec 3, 2024
1 parent 116f600 commit 65f3703
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions engine/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@

option(JLE_ALLOW_MINGW "Allow using MinGW on Windows" OFF)

if(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
endif()


if (WIN32)
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND NOT JLE_ALLOW_MINGW)
message(FATAL_ERROR "MinGW is not supported on Windows by default. Please use MSVC or enable ALLOW_MINGW to proceed with MinGW.")
Expand Down

0 comments on commit 65f3703

Please sign in to comment.