From cc616a7146c396edbedc64cad5de1ed7de935ead Mon Sep 17 00:00:00 2001 From: Dominic Hargreaves Date: Wed, 1 Jul 2015 20:10:15 -0400 Subject: [PATCH] Allow PROGRAM_NAME to be set during configuration --- CMakeLists.txt | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3a08675d7..d94ea0423 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -275,13 +275,15 @@ if(MINGW) set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS}") endif(MINGW) -# Under Windows, we set the executable name for Anope to be anope -if(WIN32) - set(PROGRAM_NAME anope) -# Under *nix, we set the executable name for Anope to be services -else(WIN32) - set(PROGRAM_NAME services) -endif(WIN32) +if(NOT PROGRAM_NAME) + # Under Windows, we set the executable name for Anope to be anope + if(WIN32) + set(PROGRAM_NAME anope) + # Under *nix, we set the executable name for Anope to be services + else(WIN32) + set(PROGRAM_NAME services) + endif(WIN32) +endif(NOT PROGRAM_NAME) # If we are not using Visual Studio, we'll run the following checks if(NOT MSVC)