Skip to content

Commit

Permalink
Fix the issue where the output path of external settings does not tak…
Browse files Browse the repository at this point in the history
…e effect!
  • Loading branch information
hammlee96 committed Oct 12, 2024
1 parent 3e8d89d commit f15a247
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.5)
cmake_minimum_required(VERSION 3.5)

project(hwinfo VERSION 1.0.0 LANGUAGES CXX)

Expand All @@ -7,8 +7,12 @@ if (WIN32)
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
endif()

set (CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
if(NOT HWINFO_CMAKE_BINARY_DIR)
set(HWINFO_CMAKE_BINARY_DIR ${CMAKE_BINARY_DIR})
endif()

set (CMAKE_LIBRARY_OUTPUT_DIRECTORY ${HWINFO_CMAKE_BINARY_DIR})
set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${HWINFO_CMAKE_BINARY_DIR})

# if standard not provided, use the latest supported by the compiler
if("${CMAKE_CXX_STANDARD}" STREQUAL "")
Expand Down Expand Up @@ -52,8 +56,8 @@ else(HWINFO_STATIC)
set(HWINFO_BUILD STATIC)
endif()

set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${HWINFO_CMAKE_BINARY_DIR}/lib)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${HWINFO_CMAKE_BINARY_DIR}/lib)

set(HWINFO_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/include")
add_subdirectory(src)
Expand Down

0 comments on commit f15a247

Please sign in to comment.