From 5f0b7ff951f63d423e075429e8b4a793c0635077 Mon Sep 17 00:00:00 2001 From: Im-Rises Date: Sun, 11 Jun 2023 00:13:40 -0400 Subject: [PATCH] Updated cmake --- CMakeLists.txt | 7 ------- CubeAscii/CMakeLists.txt | 8 ++++++-- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0412482..94ab5f4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,11 +5,4 @@ set(CMAKE_C_STANDARD_REQUIRED ON) set(CMAKE_C_EXTENSIONS OFF) project(CubeAscii) - -cmake_policy(SET CMP0079 NEW) - add_subdirectory(${PROJECT_NAME}) - -if (WIN32) - target_link_libraries(${PROJECT_NAME} PRIVATE winmm.lib) -endif () \ No newline at end of file diff --git a/CubeAscii/CMakeLists.txt b/CubeAscii/CMakeLists.txt index 63649ac..6ada2ed 100644 --- a/CubeAscii/CMakeLists.txt +++ b/CubeAscii/CMakeLists.txt @@ -1,5 +1,9 @@ -add_executable(CubeAscii main.c) +add_executable(${PROJECT_NAME} main.c) if (UNIX) - target_link_libraries(CubeAscii m) + target_link_libraries(${PROJECT_NAME} m) endif (UNIX) + +if (WIN32) + target_link_libraries(${PROJECT_NAME} PRIVATE winmm.lib) +endif () \ No newline at end of file