CMake: Fixup build after #732
parent
3c73d1a7a2
commit
9b4519280a
|
@ -101,20 +101,13 @@ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
|
||||||
# string(REGEX REPLACE "/W[0-4]" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
|
# string(REGEX REPLACE "/W[0-4]" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
|
||||||
#endif()
|
#endif()
|
||||||
|
|
||||||
else()
|
else() # GCC/Clang
|
||||||
|
|
||||||
#elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
|
||||||
# using Clang
|
|
||||||
#elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
|
|
||||||
# using GCC and maybe MinGW?
|
|
||||||
|
|
||||||
set(GODOT_LINKER_FLAGS "-static-libgcc -static-libstdc++ -Wl,-R,'$$ORIGIN'")
|
set(GODOT_LINKER_FLAGS "-static-libgcc -static-libstdc++ -Wl,-R,'$$ORIGIN'")
|
||||||
|
|
||||||
# Hmm.. maybe to strikt?
|
|
||||||
if(NOT CMAKE_SYSTEM_NAME MATCHES "Windows")
|
if(NOT CMAKE_SYSTEM_NAME MATCHES "Windows")
|
||||||
set(GODOT_COMPILE_FLAGS "-fPIC")
|
set(GODOT_COMPILE_FLAGS "-fPIC")
|
||||||
endif()
|
endif()
|
||||||
set(GODOT_COMPILE_FLAGS "-g -Wwrite-strings")
|
set(GODOT_COMPILE_FLAGS "${GODOT_COMPILE_FLAGS} -g -Wwrite-strings")
|
||||||
set(GODOT_COMPILE_FLAGS "${GODOT_COMPILE_FLAGS} -Wchar-subscripts -Wcomment -Wdisabled-optimization")
|
set(GODOT_COMPILE_FLAGS "${GODOT_COMPILE_FLAGS} -Wchar-subscripts -Wcomment -Wdisabled-optimization")
|
||||||
set(GODOT_COMPILE_FLAGS "${GODOT_COMPILE_FLAGS} -Wformat -Wformat=2 -Wformat-security -Wformat-y2k")
|
set(GODOT_COMPILE_FLAGS "${GODOT_COMPILE_FLAGS} -Wformat -Wformat=2 -Wformat-security -Wformat-y2k")
|
||||||
set(GODOT_COMPILE_FLAGS "${GODOT_COMPILE_FLAGS} -Wimport -Winit-self -Winline -Winvalid-pch")
|
set(GODOT_COMPILE_FLAGS "${GODOT_COMPILE_FLAGS} -Wimport -Winit-self -Winline -Winvalid-pch")
|
||||||
|
@ -172,7 +165,7 @@ add_library(${PROJECT_NAME}
|
||||||
${GENERATED_FILES_LIST}
|
${GENERATED_FILES_LIST}
|
||||||
)
|
)
|
||||||
add_library(godot::cpp ALIAS ${PROJECT_NAME})
|
add_library(godot::cpp ALIAS ${PROJECT_NAME})
|
||||||
target_compile_definitions(${PROJECT_NAME} PUBLIC
|
target_compile_definitions(${PROJECT_NAME} PUBLIC
|
||||||
$<$<CONFIG:Debug>:DEBUG_ENABLED>
|
$<$<CONFIG:Debug>:DEBUG_ENABLED>
|
||||||
$<$<CONFIG:Debug>:DEBUG_METHODS_ENABLED>
|
$<$<CONFIG:Debug>:DEBUG_METHODS_ENABLED>
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue