Renamed some preproc vars and some CMake/build dir cleanup
This commit is contained in:
+5
-8
@@ -5,15 +5,11 @@ cmake_policy(SET CMP0135 NEW)
|
||||
|
||||
if(CMAKE_BUILD_TYPE STREQUAL "Release")
|
||||
message(STATUS "Targeting Release build")
|
||||
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ./release)
|
||||
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ./release)
|
||||
elseif(CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||
message(STATUS "Targeting Debug build")
|
||||
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ./debug)
|
||||
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ./debug)
|
||||
set(NB_LOGGING ON)
|
||||
set(NB_BUILD_TESTS ON)
|
||||
add_compile_definitions(_NB_DEBUG)
|
||||
add_compile_definitions(_NB_BUILD_DEBUG)
|
||||
endif()
|
||||
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
||||
@@ -36,6 +32,7 @@ set(GLFW_BUILD_EXAMPLES OFF CACHE BOOL "" FORCE)
|
||||
if(NB_BUILD_TESTS)
|
||||
message(STATUS "Building tests")
|
||||
enable_testing()
|
||||
set(GLFW_BUILD_TESTS ON CACHE BOOL "" FORCE)
|
||||
include(FetchContent)
|
||||
FetchContent_Declare(
|
||||
gtest
|
||||
@@ -51,13 +48,13 @@ endif()
|
||||
|
||||
if (NB_LOGGING)
|
||||
message(STATUS "Building with automatic logging")
|
||||
add_compile_definitions(_NB_AUTO_LOG)
|
||||
add_compile_definitions(_NB_AUTOLOG)
|
||||
endif()
|
||||
|
||||
if (NB_TARGET_WINDOWS)
|
||||
add_compile_definitions(_TARGET_WINDOWS)
|
||||
add_compile_definitions(_NB_TARGET_WINDOWS)
|
||||
elseif (NB_TARGET_LINUX)
|
||||
add_compile_definitions(_TARGET_LINUX)
|
||||
add_compile_definitions(_NB_TARGET_LINUX)
|
||||
endif()
|
||||
|
||||
add_subdirectory(./engine)
|
||||
|
||||
Reference in New Issue
Block a user