Can't set target link options until we've defined the target.

This commit is contained in:
John Ralls 2020-06-12 23:22:27 +02:00
parent 49e394e3bd
commit e5a14b8946

View File

@ -74,7 +74,6 @@ set(gnucash_cli_SOURCES
if (MINGW) if (MINGW)
list(APPEND gnucash_cli_SOURCES "gnucash-windows-locale.c") list(APPEND gnucash_cli_SOURCES "gnucash-windows-locale.c")
target_link_options(gnucash-cli PRIVATE -mconsole)
endif() endif()
add_executable (gnucash-cli add_executable (gnucash-cli
@ -83,6 +82,10 @@ add_executable (gnucash-cli
${gnucash_noinst_HEADERS} ${gnucash_noinst_HEADERS}
) )
if (MINGW)
target_link_options(gnucash-cli PRIVATE -mconsole)
endif()
add_dependencies (gnucash-cli gnucash) add_dependencies (gnucash-cli gnucash)
target_compile_definitions(gnucash-cli PRIVATE -DG_LOG_DOMAIN=\"gnc.bin\") target_compile_definitions(gnucash-cli PRIVATE -DG_LOG_DOMAIN=\"gnc.bin\")