2022-01-15 00:14:12 +01:00
|
|
|
project(main)
|
|
|
|
|
2022-02-06 22:29:16 +01:00
|
|
|
add_executable(main ${APPLICATION_TYPE}
|
2022-01-15 00:14:12 +01:00
|
|
|
source/main.cpp
|
|
|
|
|
|
|
|
source/window/window.cpp
|
|
|
|
source/window/win_window.cpp
|
|
|
|
source/window/macos_window.cpp
|
|
|
|
source/window/linux_window.cpp
|
|
|
|
|
|
|
|
source/init/splash_window.cpp
|
|
|
|
source/init/tasks.cpp
|
|
|
|
|
|
|
|
${IMHEX_ICON}
|
|
|
|
)
|
|
|
|
|
|
|
|
target_include_directories(main PUBLIC include)
|
2022-08-05 08:32:08 +02:00
|
|
|
setupCompilerWarnings(main)
|
2022-01-15 00:14:12 +01:00
|
|
|
|
|
|
|
set_target_properties(main PROPERTIES
|
|
|
|
OUTPUT_NAME "imhex"
|
|
|
|
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/..
|
|
|
|
CXX_VISIBILITY_PRESET hidden
|
|
|
|
POSITION_INDEPENDENT_CODE ON)
|
|
|
|
|
2022-02-02 17:19:50 +01:00
|
|
|
add_compile_definitions(IMHEX_PROJECT_NAME="${PROJECT_NAME}")
|
|
|
|
|
2022-01-15 00:14:12 +01:00
|
|
|
if (WIN32)
|
2022-07-07 23:30:09 +02:00
|
|
|
target_link_libraries(main PUBLIC usp10 libimhex wsock32 ws2_32 Dwmapi.lib)
|
2022-01-15 00:14:12 +01:00
|
|
|
else ()
|
2022-02-01 18:09:40 +01:00
|
|
|
target_link_libraries(main PUBLIC libimhex pthread)
|
2022-03-27 00:01:28 +01:00
|
|
|
endif ()
|
|
|
|
|
|
|
|
if (APPLE)
|
|
|
|
add_compile_definitions(GL_SILENCE_DEPRECATION)
|
2022-01-15 00:14:12 +01:00
|
|
|
endif ()
|