@@ -106,8 +106,6 @@ target_include_directories( string-view-lite INTERFACE
106106configure_file ( "${CMAKE_CURRENT_LIST_DIR} /External/cfgpath/cfgpath.h"
107107 "${CMAKE_CURRENT_LIST_DIR} /Include/cfgpath.h" COPYONLY )
108108
109-
110-
111109if (RUNCPP2_BUILD_TESTS)
112110 add_subdirectory ("${CMAKE_CURRENT_LIST_DIR} /External/ssTest" )
113111endif ()
@@ -193,14 +191,14 @@ set(RUNCPP2_SOURCE_FILES "${CMAKE_CURRENT_LIST_DIR}/Src/runcpp2/Data/Profile.
193191 "${CMAKE_CURRENT_LIST_DIR} /Src/runcpp2/PipelineSteps.cpp"
194192 "${CMAKE_CURRENT_LIST_DIR} /Src/runcpp2/IncludeManager.cpp" )
195193
196- add_library (runcpp2 STATIC ${RUNCPP2_SOURCE_FILES} )
194+ add_library (runcpp2Lib STATIC ${RUNCPP2_SOURCE_FILES} )
197195
198196set (RUNCPP2_PRIVATE_LINK_LIBS ssLogger System2 CppOverride dylib)
199197set (RUNCPP2_PUBLIC_LINK_LIBS ghc_filesystem ryml::ryml mpark_variant MacroPowerToys string -view-lite yaml DSResult)
200198
201- target_include_directories (runcpp2 PUBLIC "${CMAKE_CURRENT_LIST_DIR} /Include" )
202- target_link_libraries (runcpp2 PRIVATE ${RUNCPP2_PRIVATE_LINK_LIBS} )
203- target_link_libraries (runcpp2 PUBLIC ${RUNCPP2_PUBLIC_LINK_LIBS} )
199+ target_include_directories (runcpp2Lib PUBLIC "${CMAKE_CURRENT_LIST_DIR} /Include" )
200+ target_link_libraries (runcpp2Lib PRIVATE ${RUNCPP2_PRIVATE_LINK_LIBS} )
201+ target_link_libraries (runcpp2Lib PUBLIC ${RUNCPP2_PUBLIC_LINK_LIBS} )
204202
205203if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC" )
206204 # TODO: Try to change to /Wall
@@ -226,34 +224,34 @@ else()
226224 endif ()
227225endif ()
228226
229- target_compile_options (runcpp2 PRIVATE "${RUNCPP2_STANDARD_COMPILE_FLAGS} " )
227+ target_compile_options (runcpp2Lib PRIVATE "${RUNCPP2_STANDARD_COMPILE_FLAGS} " )
230228
231229# Define the runcpp2 and default config version macro
232- target_compile_definitions (runcpp2 PUBLIC RUNCPP2_VERSION="${RUNCPP2_PROJECT_VERSION} "
233- RUNCPP2_CONFIG_VERSION=${RUNCPP2_CONFIG_VERSION} )
230+ target_compile_definitions (runcpp2Lib PUBLIC RUNCPP2_VERSION="${RUNCPP2_PROJECT_VERSION} "
231+ RUNCPP2_CONFIG_VERSION=${RUNCPP2_CONFIG_VERSION} )
234232
235233# =========================================================================
236234# runcpp2 executable
237235# =========================================================================
238236
239- add_executable (runcpp2_main "${CMAKE_CURRENT_LIST_DIR} /Src/runcpp2/main.cpp" )
240- target_compile_options (runcpp2_main PRIVATE "${RUNCPP2_STANDARD_COMPILE_FLAGS} " )
241- target_link_libraries (runcpp2_main PRIVATE runcpp2 ssLogger)
242- set_target_properties (runcpp2_main PROPERTIES OUTPUT_NAME "runcpp2" )
237+ add_executable (runcpp2 "${CMAKE_CURRENT_LIST_DIR} /Src/runcpp2/main.cpp" )
238+ target_compile_options (runcpp2 PRIVATE "${RUNCPP2_STANDARD_COMPILE_FLAGS} " )
239+ target_link_libraries (runcpp2 PUBLIC runcpp2Lib ssLogger)
243240
244241# =========================================================================
245242# runcpp2 library override
246243# =========================================================================
247244
248- add_library (runcpp2_override STATIC ${RUNCPP2_SOURCE_FILES} )
249- target_include_directories (runcpp2_override PUBLIC "${CMAKE_CURRENT_LIST_DIR} /Include" )
250- target_link_libraries (runcpp2_override PRIVATE ${RUNCPP2_PRIVATE_LINK_LIBS} )
251- target_link_libraries (runcpp2_override PUBLIC ${RUNCPP2_PUBLIC_LINK_LIBS} )
252- target_compile_options (runcpp2_override PRIVATE "${RUNCPP2_STANDARD_COMPILE_FLAGS} " )
253- target_compile_definitions (runcpp2_override PUBLIC RUNCPP2_VERSION="${RUNCPP2_PROJECT_VERSION} "
254- RUNCPP2_CONFIG_VERSION=${RUNCPP2_CONFIG_VERSION}
255- INTERNAL_RUNCPP2_UNIT_TESTS=1)
256245if (RUNCPP2_BUILD_TESTS)
246+ add_library (runcpp2Override STATIC ${RUNCPP2_SOURCE_FILES} )
247+ target_include_directories (runcpp2Override PUBLIC "${CMAKE_CURRENT_LIST_DIR} /Include" )
248+ target_link_libraries (runcpp2Override PRIVATE ${RUNCPP2_PRIVATE_LINK_LIBS} )
249+ target_link_libraries (runcpp2Override PUBLIC ${RUNCPP2_PUBLIC_LINK_LIBS} )
250+ target_compile_options (runcpp2Override PRIVATE "${RUNCPP2_STANDARD_COMPILE_FLAGS} " )
251+ target_compile_definitions ( runcpp2Override PUBLIC
252+ RUNCPP2_VERSION="${RUNCPP2_PROJECT_VERSION} "
253+ RUNCPP2_CONFIG_VERSION=${RUNCPP2_CONFIG_VERSION}
254+ INTERNAL_RUNCPP2_UNIT_TESTS=1)
257255 add_subdirectory ("${CMAKE_CURRENT_LIST_DIR} /Src/Tests" )
258256endif ()
259257
0 commit comments