CMake fixes
This commit is contained in:
parent
3e67b54d6f
commit
ea6f67f87c
1 changed files with 7 additions and 7 deletions
|
@ -219,31 +219,33 @@ set(RESOURCES
|
||||||
WAVE/WAVE100
|
WAVE/WAVE100
|
||||||
)
|
)
|
||||||
|
|
||||||
|
add_executable(CSE2 ${SOURCES} ${RESOURCE_HEADERS})
|
||||||
|
|
||||||
# Handle options
|
# Handle options
|
||||||
if (JAPANESE)
|
if (JAPANESE)
|
||||||
list(APPEND RESOURCES "BITMAP/PIXEL_JP.bmp")
|
list(APPEND RESOURCES "BITMAP/PIXEL_JP.bmp")
|
||||||
add_definitions(-DJAPANESE)
|
target_compile_definitions(CSE2 PRIVATE JAPANESE)
|
||||||
else()
|
else()
|
||||||
list(APPEND RESOURCES "BITMAP/PIXEL.bmp")
|
list(APPEND RESOURCES "BITMAP/PIXEL.bmp")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (FIX_BUGS)
|
if (FIX_BUGS)
|
||||||
add_definitions(-DFIX_BUGS)
|
target_compile_definitions(CSE2 PRIVATE FIX_BUGS)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (WINDOWS)
|
if (WINDOWS)
|
||||||
list(APPEND SOURCES "res/ICON/ICON.rc")
|
list(APPEND SOURCES "res/ICON/ICON.rc")
|
||||||
add_definitions(-DWINDOWS)
|
target_compile_definitions(CSE2 PRIVATE WINDOWS)
|
||||||
else()
|
else()
|
||||||
list(APPEND RESOURCES "ICON/ICON_MINI.bmp")
|
list(APPEND RESOURCES "ICON/ICON_MINI.bmp")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (RASPBERRY_PI)
|
if (RASPBERRY_PI)
|
||||||
add_definitions(-DRASPBERRY_PI)
|
target_compile_definitions(CSE2 PRIVATE RASPBERRY_PI)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (NONPORTABLE)
|
if (NONPORTABLE)
|
||||||
add_definitions(-DNONPORTABLE)
|
target_compile_definitions(CSE2 PRIVATE NONPORTABLE)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Magic to convert resources to header files
|
# Magic to convert resources to header files
|
||||||
|
@ -262,8 +264,6 @@ foreach(FILENAME IN LISTS RESOURCES)
|
||||||
list(APPEND RESOURCE_HEADERS "${OUT_DIR}/${FILENAME}.h")
|
list(APPEND RESOURCE_HEADERS "${OUT_DIR}/${FILENAME}.h")
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
add_executable(CSE2 ${SOURCES} ${RESOURCE_HEADERS})
|
|
||||||
|
|
||||||
if (NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
|
if (NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||||
# Enable link-time optimisation if available
|
# Enable link-time optimisation if available
|
||||||
include(CheckIPOSupported)
|
include(CheckIPOSupported)
|
||||||
|
|
Loading…
Add table
Reference in a new issue