Skip to content

Commit cb9ee70

Browse files
committed
Fixed the misuse of option function
1 parent 1f1cb23 commit cb9ee70

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

cmake/common-config.cmake

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11

22
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
33

4+
# Taken from https://github.com/SFML/SFML
5+
macro(set_option var default type docstring)
6+
if(NOT DEFINED ${var})
7+
set(${var} ${default})
8+
endif()
9+
set(${var} ${${var}} CACHE ${type} ${docstring} FORCE)
10+
endmacro()
11+
412
# Project name based on the given platform name
5-
option(PROJECT_TARGET_NAME "The postfix added to the project name" "generic")
13+
set_option(PROJECT_TARGET_NAME "generic" STRING "The postfix added to the project name")

0 commit comments

Comments
 (0)