Skip to content

Commit

Permalink
Test
Browse files Browse the repository at this point in the history
  • Loading branch information
beefviper committed Dec 19, 2024
1 parent 2821420 commit 0d34faf
Showing 1 changed file with 15 additions and 16 deletions.
31 changes: 15 additions & 16 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -79,22 +79,6 @@ if(EXISTS ${XERCES_CMAKELISTS})
file(WRITE ${XERCES_CMAKELISTS} "${MODIFIED_CONTENT}")
endif()

# Path to the Xerces-C CMakeLists.txt file
set(XERCES_CMAKETESTS ${PROJECT_BINARY_DIR}/_deps/xercesc-build/CTestTestfile.cmake)

# Check if the file exists
if(EXISTS ${XERCES_CMAKETESTS})
# Read the file content
file(READ ${XERCES_CMAKETESTS} CMAKETESTS_CONTENT)

# Remove the specific line "add_subdirectory(samples)"
string(REPLACE "subdirs(\"tests\")" "" MODIFIED_CONTENT ${CMAKETESTS_CONTENT})
string(REPLACE "subdirs(\"samples\")" "" MODIFIED_CONTENT ${MODIFIED_CONTENT})

# Write the modified content back to the file
file(WRITE ${XERCES_CMAKETESTS} "${MODIFIED_CONTENT}")
endif()

find_path(EXPRTK_INCLUDE_DIRS "exprtk.hpp" HINTS ${PROJECT_BINARY_DIR}/_deps/exprtk-src/include)

target_include_directories(${PROJECT_NAME} PUBLIC source/include)
Expand All @@ -120,6 +104,21 @@ set_target_properties(sfml-graphics PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${PROJEC
set_target_properties(sfml-network PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR})
set_target_properties(sfml-audio PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR})

# Path to the Xerces-C CMakeLists.txt file
set(XERCES_CMAKETESTS ${PROJECT_BINARY_DIR}/_deps/xercesc-build/CTestTestfile.cmake)

# Check if the file exists
if(EXISTS ${XERCES_CMAKETESTS})
# Read the file content
file(READ ${XERCES_CMAKETESTS} CMAKETESTS_CONTENT)

# Remove the specific line "add_subdirectory(samples)"
string(REPLACE "subdirs" "" MODIFIED_CONTENT ${CMAKETESTS_CONTENT})

# Write the modified content back to the file
file(WRITE ${XERCES_CMAKETESTS} "${MODIFIED_CONTENT}")
endif()

add_dependencies(${PROJECT_NAME} data-target)

if (NOT CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_CURRENT_BINARY_DIR)
Expand Down

0 comments on commit 0d34faf

Please sign in to comment.