File tree Expand file tree Collapse file tree 2 files changed +15
-12
lines changed Expand file tree Collapse file tree 2 files changed +15
-12
lines changed Original file line number Diff line number Diff line change @@ -12,3 +12,16 @@ ExternalProject_Add(ppc_libenvpp
12
12
-D CMAKE_C_COMPILER_LAUNCHER=${CMAKE_C_COMPILER_LAUNCHER} -D CMAKE_CXX_COMPILER_LAUNCHER=${CMAKE_CXX_COMPILER_LAUNCHER}
13
13
BUILD_COMMAND "${CMAKE_COMMAND} " --build "${CMAKE_CURRENT_BINARY_DIR} /ppc_libenvpp/build" --config ${CMAKE_BUILD_TYPE} --parallel
14
14
INSTALL_COMMAND "${CMAKE_COMMAND} " --install "${CMAKE_CURRENT_BINARY_DIR} /ppc_libenvpp/build" --prefix "${CMAKE_CURRENT_BINARY_DIR} /ppc_libenvpp/install" )
15
+
16
+ string (TOLOWER "${CMAKE_BUILD_TYPE} " cmake_build_type_lower )
17
+ if (cmake_build_type_lower STREQUAL "debug" )
18
+ set (PPC_FMT_LIB_NAME fmtd )
19
+ else ()
20
+ set (PPC_FMT_LIB_NAME fmt )
21
+ endif ()
22
+
23
+ if (MSVC )
24
+ set (PPC_ENVPP_LIB_NAME libenvpp )
25
+ else ()
26
+ set (PPC_ENVPP_LIB_NAME envpp )
27
+ endif ()
Original file line number Diff line number Diff line change @@ -26,18 +26,8 @@ set_target_properties(${exec_func_lib} PROPERTIES LINKER_LANGUAGE CXX)
26
26
add_dependencies (${exec_func_lib} ppc_libenvpp )
27
27
target_link_directories (${exec_func_lib} PUBLIC "${CMAKE_BINARY_DIR} /ppc_libenvpp/install/lib" )
28
28
target_link_directories (${exec_func_lib} PUBLIC "${CMAKE_BINARY_DIR} /ppc_libenvpp/build" )
29
-
30
- if (MSVC )
31
- target_link_libraries (${exec_func_lib} PUBLIC libenvpp )
32
- else ()
33
- target_link_libraries (${exec_func_lib} PUBLIC envpp )
34
- endif ()
35
-
36
- if (CMAKE_BUILD_TYPE STREQUAL "Debug" )
37
- target_link_libraries (${exec_func_lib} PUBLIC fmtd )
38
- else ()
39
- target_link_libraries (${exec_func_lib} PUBLIC fmt )
40
- endif ()
29
+ target_link_libraries (${exec_func_lib} PUBLIC ${PPC_ENVPP_LIB_NAME} )
30
+ target_link_libraries (${exec_func_lib} PUBLIC ${PPC_FMT_LIB_NAME} )
41
31
42
32
add_dependencies (${exec_func_lib} ppc_json )
43
33
target_link_directories (${exec_func_lib} INTERFACE "${CMAKE_BINARY_DIR} /ppc_json/install/include" )
You can’t perform that action at this time.
0 commit comments