Fix leak, rename and some non working mingw shit
This commit is contained in:
+18
-7
@@ -8,15 +8,22 @@ if(CMAKE_BUILD_TYPE MATCHES DEBUG)
|
||||
add_link_options(-fsanitize=address)
|
||||
endif()
|
||||
|
||||
set(CMAKE_C_FLAGS "-Wall -Wextra -pedantic -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wmaybe-uninitialized -Wno-unused-variable")
|
||||
set(CMAKE_C_FLAGS_DEBUG "-g -Werror -O0")
|
||||
set(CMAKE_C_FLAGS_RELEASE "")
|
||||
|
||||
if(MINGW)
|
||||
set(CMAKE_C_FLAGS "-Wno-undef --static -windows")
|
||||
set(CMAKE_C_FLAGS_DEBUG "-g -O0")
|
||||
set(CMAKE_C_FLAGS_RELEASE "-O2")
|
||||
else()
|
||||
set(CMAKE_C_FLAGS "-Wall -Wextra -pedantic -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wmaybe-uninitialized -Wno-unused-variable")
|
||||
set(CMAKE_C_FLAGS_DEBUG "-g -Werror -O0")
|
||||
set(CMAKE_C_FLAGS_RELEASE "")
|
||||
endif()
|
||||
|
||||
# generate the compile_commands for vscode / clang
|
||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON CACHE INTERNAL "")
|
||||
|
||||
# set the project name
|
||||
project(FLOPPE_FION)
|
||||
project(LEGEND_OF_ADAME)
|
||||
|
||||
|
||||
set(SRC
|
||||
@@ -32,13 +39,17 @@ set(SRC
|
||||
)
|
||||
|
||||
# add the executable
|
||||
add_executable(FLOPPE_FION ${SRC})
|
||||
add_executable(LEGEND_OF_ADAME ${SRC})
|
||||
|
||||
|
||||
target_link_libraries(FLOPPE_FION SDL2 SDL2_image SDL2_ttf SDL2_mixer m)
|
||||
target_link_libraries(LEGEND_OF_ADAME SDL2 SDL2_image SDL2_ttf SDL2_mixer m)
|
||||
|
||||
|
||||
set_property(TARGET FLOPPE_FION PROPERTY C_STANDARD 23)
|
||||
set_property(TARGET LEGEND_OF_ADAME PROPERTY C_STANDARD 23)
|
||||
|
||||
|
||||
file(COPY assets DESTINATION ${CMAKE_BINARY_DIR})
|
||||
|
||||
if(MINGW)
|
||||
target_link_libraries(LEGEND_OF_ADAME ws2_32 windows mingw32 SDLmain SDL)
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user