diff options
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 59a3f2d..467e7d6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,6 +16,21 @@ set(CMAKE_C_STANDARD 11) set(CMAKE_CXX_STANDARD 17) set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}) +set(MELONDS_VERSION "0.9.1") +add_compile_definitions(MELONDS_VERSION="${MELONDS_VERSION}") +string(REPLACE "." ";" VERSION_LIST ${MELONDS_VERSION}) +# For the melon.rc file used on Windows +list(GET VERSION_LIST 0 MELONDS_VERSION_MAJOR) +list(GET VERSION_LIST 1 MELONDS_VERSION_MINOR) +# Check if melonDS version is three digits or two digits +list(LENGTH VERSION_LIST MELONDS_VER_LEN) +if (${MELONDS_VER_LEN} GREATER 2) + list(GET VERSION_LIST 2 MELONDS_VERSION_PATCH) +else() + set(MELONDS_VERSION_PATCH 0) +endif() + + check_library_exists(m pow "" LIBM) if(LIBM) link_libraries(m) |