|
|
@ -4,6 +4,25 @@ project(zinnia VERSION 0.1 |
|
|
|
LANGUAGES C CXX) |
|
|
|
set(CMAKE_CXX_STANDARD 17) |
|
|
|
|
|
|
|
# ## Thanks to yipdw/ninjawedding for this snippet: https://gitlab.peach-bun.com/snippets/103 |
|
|
|
# If ld.gold is available, use it -- it's faster. Also enable incremental |
|
|
|
# linking for debug and release. |
|
|
|
|
|
|
|
# TODO: It's probably a good idea to enable -z relro for non-development |
|
|
|
# builds. That's more CMake archaeology, though, and I'm not really in the |
|
|
|
# mood for that now. |
|
|
|
# option(USE_LD_GOLD "Use GNU gold linker" ON) |
|
|
|
# execute_process(COMMAND ${CMAKE_C_COMPILER} -fuse-ld=gold -Wl,--version ERROR_QUIET OUTPUT_VARIABLE LD_VERSION) |
|
|
|
# if(USE_LD_GOLD) |
|
|
|
# execute_process(COMMAND ${CMAKE_C_COMPILER} -fuse-ld=gold -Wl,--version ERROR_QUIET OUTPUT_VARIABLE LD_VERSION) |
|
|
|
# if("${LD_VERSION}" MATCHES "GNU gold") |
|
|
|
# set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fuse-ld=gold -Wl,-z,norelro -Wl,--incremental") |
|
|
|
# else() |
|
|
|
# message(WARNING "GNU gold linker isn't available, using the default system linker.") |
|
|
|
# endif() |
|
|
|
# endif() |
|
|
|
|
|
|
|
|
|
|
|
find_package(PkgConfig REQUIRED) |
|
|
|
find_package(OpenGL REQUIRED) |
|
|
|
pkg_check_modules(GTK3 REQUIRED gtk+-3.0) |
|
|
|