diff options
| author | zhengchao <[email protected]> | 2022-01-24 19:47:17 +0500 |
|---|---|---|
| committer | zhengchao <[email protected]> | 2022-01-24 19:47:17 +0500 |
| commit | a0e9dba33fe250ae6ae6ddd613cca0e8ec74cf2a (patch) | |
| tree | 190cd223ade09cc502bcb9ec8e819d89a0eed9d6 | |
| parent | 1766aba3ae69495454dd8be7181105d8a8a484b5 (diff) | |
CMake支持 -DCMAKE_INSTALL_PREFIX指定安装目录,默认/opt/MESA
| -rwxr-xr-x | CMakeLists.txt | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 8db9085..29ed48a 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,8 +9,10 @@ include(Version) set(CMAKE_MACOSX_RPATH 0) set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} -Wall) -set(CMAKE_INSTALL_PREFIX /opt/MESA) - +if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) + set (CMAKE_INSTALL_PREFIX "/opt/MESA" + CACHE PATH "default install path" FORCE) +endif() #for ASAN set(ASAN_OPTION "OFF" CACHE STRING " set asan type chosen by the user, using OFF as default") set_property(CACHE ASAN_OPTION PROPERTY STRINGS OFF ADDRESS THREAD) @@ -57,7 +59,7 @@ install(FILES inc/field_stat2.h DESTINATION ${CMAKE_INSTALL_PREFIX}/include/ include(Package) -file(GLOB DEMO +file(GLOB DEMO "test/*.c" "test/*.cpp" ) |
