preprocessor macro, cmake conditional for SDL_main
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
include_directories(lib/cmake)
|
||||
|
||||
|
||||
# gui libraries ---------------------------------------------------------------------------------------------------
|
||||
set(IMGUI_PATH "lib/imgui")
|
||||
file(GLOB IMGUI_SOURCES ${IMGUI_PATH}/*.cpp)
|
||||
@@ -67,16 +66,8 @@ target_include_directories(
|
||||
${GLEW_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
if (WIN32)
|
||||
target_link_libraries(
|
||||
yaze
|
||||
SDL2::SDL2main
|
||||
)
|
||||
add_definitions(-DSDL_MAIN_HANDLED)
|
||||
endif()
|
||||
|
||||
target_link_libraries(
|
||||
yaze
|
||||
set(
|
||||
ABSL_TARGETS
|
||||
absl::strings
|
||||
absl::flags
|
||||
absl::status
|
||||
@@ -89,7 +80,19 @@ target_link_libraries(
|
||||
absl::raw_logging_internal
|
||||
absl::failure_signal_handler
|
||||
absl::flat_hash_map
|
||||
SDL2::SDL2
|
||||
)
|
||||
|
||||
set(SDL_TARGETS SDL2::SDL2)
|
||||
|
||||
if(WIN32 OR MINGW)
|
||||
list(PREPEND SDL_TARGETS SDL2::SDL2main)
|
||||
add_definitions(-DSDL_MAIN_HANDLED)
|
||||
endif()
|
||||
|
||||
target_link_libraries(
|
||||
yaze
|
||||
${ABSL_TARGETS}
|
||||
${SDL_TARGETS}
|
||||
${PNG_LIBRARIES}
|
||||
${GLEW_LIBRARIES}
|
||||
${OPENGL_LIBRARIES}
|
||||
|
||||
Reference in New Issue
Block a user